->delete()

->delete() -- Delete items from table

Synopsis

int $DB_DataObject->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 DB_DATAOBJECT_WHEREADD_ONLY.

Параметр

Возвращаемое значение

int number of rows affected or FALSE on failure

Throws

Таблица 34-1. Возможные значения PEAR_Error

Error codeError messageMeaningSolution
DB_*"*"see PEAR::DBsee PEAR::DB
DB_DATAOBJECT_ERROR_NODATA "delete: No Data specifed for query $condition"   

Заметка

Эта функция не должна вызываться статически.

Пример


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ