Documentation

Write Query


Write Query

DB class implements insert, update and delete methods

insert( table, fields )

This method allows to insert a single row into a table by passing the name of the table and the associative array that contains field and value

db::insert("user", array("name"=>"Mickey", "agency"=>"Disney") );



update( table, fields, where )

Update the value of the selected rows of the selected table

db::update("user", array("name"=>"Donald", "agency"=>"Disney"), "user_id=1" );

 

delete( table, where )

Delete selected rows

db::delete("user", "name='Donald'" );