Class ParentModel
Class ParentModel connects to the database and provides useful functions (query, queryIndexed, updateRow, getRow). See each one for more details.
Indirect known subclasses
HomeModel, LicenseModel, LoginModel, Vendor\Landingpage\LandingModel, Vendor\Menu\MenuModel
public static
|
|
public
PDO
|
#
query( string $query, array $params = array(), boolean $fetchAll = FALSE )
Runs a given $query string and returns the PDO object. |
public
PDO
|
#
queryClass( string $query, array $params, string $className )
Runs a given $query string and returns the instance of the $className. |
public
PDO
|
#
queryIndexed( string $query, array $params = array(), boolean $unique = TRUE )
Runs a given $query string and returns the PDO object or the fetched results, indexed by the first column. |
public
array
|
#
getRow( string $tableName, string $columnValue, string $columnName = 'id' )
Gets a single result from a given table name and a given column name |
public
integer
|
#
updateRow( string $tableName, string $columnName, integer $id, mixed $value )
Updates a given row of a given table to a given value |
protected
PDO
|
$db
The database object. |
|
protected
|
$config
The instance of the Config class. |
|
protected
string
|
$id
The project ID. Set from /app/config/config.ini. |
#
__ID__
|