Delete the data into the database according the table element
A primaryKey should be set. If the key is not set It can be obtained from jqGridDB::getPrimaryKey Return true on success, false when the operation is not succefull
Parameters:
array |
$data: |
associative array which key values correspond to the names in the delete command |
API Tags:
Information Tags:
Todo: | possibility to set additional where clause |
void editGrid(
[
$summary = null], [
$params = null], [string
$oper = false]
)
|
|
Perform the all CRUD operations depending on the oper param send from the grid and the table element If the primaryKey is not set we try to obtain it using jqGridDB::getPrimaryKey If the primary key is not set or can not be obtained the operation is aborted.
Also the method call the queryGrid to perform the grid ouput
Parameters:
array |
$summary: |
- set which columns should be sumarized in order to be displayed to the grid By default this parameter uses SQL SUM function: array("colmodelname"=>"sqlname"); It can be set to use the other one this way array("colmodelname"=>array("sqlname"=>"AVG")); By default the first field correspond to the name of colModel the second to the database name |
array |
$params: |
additional parameters that can be passed to the query |
string |
$oper: |
if set the requested oper operation is performed without to check the parameter sended from the grid. |
API Tags:
Return the fields generated for CRUD operations
API Tags:
string getPrimaryKeyId(
)
|
|
Return the primary key of the table
API Tags:
boolean insert(
array
$data
)
|
|
Insert the data array into the database according to the table element.
A primaryKey should be set. If the key is not set It can be obtained from jqGridDB::getPrimaryKey Return true on succes, false otherwiese.
Parameters:
array |
$data: |
associative array which key values correspond to the names in the table. |
API Tags:
Information Tags:
Todo: | in the future we should return the last insert id from the table |
void setPrimaryKeyId(
string
$keyid
)
|
|
Set a primary key for the table
Parameters:
API Tags:
void setTable(
string
$_newtable
)
|
|
Set table for CRUD and build the fields
Parameters:
API Tags:
boolean update(
array
$data
)
|
|
Update the data into the database according the table element
A primaryKey should be set. If the key is not set It can be obtained from jqGridDB::getPrimaryKey Return true on success, false when the operation is not succefull
Parameters:
array |
$data: |
associative array which key values correspond to the names in the table |
API Tags:
Information Tags:
Todo: | possibility to set additional where clause |
Build the fields array with a database fields from the table.
Also we get the fields types Return false if the fields can not be build.
API Tags: