Modifying the database

Modifying the database --  ::update(), ::insert(), ::delete(),

::update()

Updating the data.

boolean ::update ()

updates the database using the objects variables, returns TRUE on success

This would execute the following SQL statements, both fetching and updating the database.

To perform a general update on a table, use the WhereAdd() method

This would execute the following SQL statements, both fetching and updating the database.

::insert()

Inserting data.

int ::insert ()

Inserts data into the database and returns the key/ID if any.

This would execute the following SQL statements, (It may also do sequences on some databases, it uses mysql_next_id on mysql)

::delete()

Deleting data.

::delete ([boolean UseWhere])

Deletes data from the database, either using primary key or based on a WhereAdd() method call. by default the delete will base it's query on the set variables, however if you wish to use the WhereAdd method you should set the UseWhere parameter to TRUE

This would execute the following SQL statements,