User:Michaeltwofish/extending query record

From Habari Project

Jump to: navigation, search

QueryRecord API

Implement insert(), update(), delete().

insert() should call parent::insertRecord( '{table_name}' ); // with the braces

delete() should call parent::deleteRecord( '{table_name}', array( 'id'=>$this->id ) ); // with the table name, and the array to match what should be deleted.

$this->newfields holds fields that will be changed on update()

Personal tools