Othe public methods that can be used within this calss can be seen jqGrid Class Methods:


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 table

API Tags:
Access: public

Perform the all CRUD operations depending on the oper param send from the grid (oper option, which by default is add,edit,delete) 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. See here
  • array $params: additional parameters that can be passed to the query. See here
  • string $oper: if set the requested oper operation is performed without to check the parameter sended from the grid.

API Tags:
Access: public


Return array of the table fields generated for CRUD operations. Should be used after insert, update, delete. Mainly can be used for debugging purposes

API Tags:
Access: public

Return the primary key of the table

API Tags:
Access: public

The method return the last inserted id when a add is performed and the primary key is serial. In order to have effect this method should be called after renderGrid, editGrid or insert methods - see below

API Tags:
Access: public


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 keys correspond to the names and values to be insered into the table.

API Tags:
Access: public


Run sql command(s) after a CRUD operation (add, edit, del) is succesfull.
Can run unlimeted command
Parameters:

  • string $oper: the operation after which the sql query should be run can be 'add', 'edit', 'del'
  • string $sql: the sql command to be run
  • array $param: paremeters passed to the sql query

API Tags:
Access: public

Run sql command(s) before a CRUD operation (add, edit, del). If for some reason this operation fail all other operation in the transaction are ignored.
Can run unlimeted commands
Parameters:

  • string $oper: the operation after which the sql query should be run can be 'add', 'edit', 'del'
  • string $sql: the sql command to be run
  • array $param: paremeters passed to the sql query

API Tags:
Access: public


Set a primary key for the table
Parameters:

  • string $keyid: the praymery key to be set.

API Tags:
Access: public

Set table for CRUD operations
Parameters:
  • string $_newtable: a table to be used for CRUD. Also the method use the public variable $table.

API Tags:
Access: public

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:
Access: public