->update()

->update()

->update() -- Update objects variables into database

Description

Updates current objects variables into the database. if you supply it with a dataObject, as an argument, it will only update the differences between the new and old.

if called with DB_DATAOBJECT_WHEREADD_ONLY as the argument, the update request is built based on the whereAdd values, rather than the primary key. This enables global updates to be performed, rather than single row ones.

Parameter

  • DataObject $original - if provided the update query will be built from the difference between the current and original dataobject.

Return value

int number of rows affected or FALSE on failure

Note

This function can not be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.