Property | Type | Description | |
---|---|---|---|
$mu_single_table | |||
$per_page | |||
$table_name | type | - database table linked to the model. All the queries will be fired on that table or with the join in this table. $per_page - number of rows per page to be displayed |
Method | Description | |
---|---|---|
__call ( string $name, array $arguments ) : array | Magic Method for getting DB rows by particular column. | |
__construct ( string $table_name, boolean $withprefix = false, $per_page = 10, $mu_single_table = false ) | ||
delete ( array $where ) : array | ||
get ( array $columns, $offset = false, $per_page = false, $order_by = 'id desc' ) : array | Get all the rows according to the columns set in $columns parameter. | |
insert ( array $row ) : integer | ||
set_per_page ( integer $per_page ) | set number of rows per page for pagination | |
set_table_name ( string $table_name, mixed $withprefix = false ) | ||
update ( array $data, array $where ) |
public __construct ( string $table_name, boolean $withprefix = false, $per_page = 10, $mu_single_table = false ) | ||
$table_name | string | Table name for model |
$withprefix | boolean | Set true if $tablename is with prefix otherwise it will prepend wordpress prefix with "rt_" |
public set_per_page ( integer $per_page ) | ||
$per_page | integer |
public set_table_name ( string $table_name, mixed $withprefix = false ) | ||
$table_name | string | |
$withprefix | mixed |