View / Download this file.
---------------------------------------
PTMDB MODULE - db_delete_row() FUNCTION
---------------------------------------
------------
USAGE FORMAT
------------
Where $ret is a return value of 1 or 0 (zero):
$ret = &db_delete_row($db_object, $table, $column, $value);
-----------
DESCRIPTION
-----------
Removes a row from a given database table based on a `column` = 'value'
comparison match. Use caution when using this function as all matched
rows will be removed from your database table. Ensure that you use the
most precise match comparisons possible.
Returns 1 if successful.
Returns 0 (zero) if not successful.
---------
ARGUMENTS
---------
$db_object
REQUIRED
A database handler object. This object stores connection information and
is returned from a db_connect() function call. This object is of the same
type as is returned by a DBI->connect function call.
$table
REQUIRED
The name of the table from which you would like to remove row information.
$column
REQUIRED
The column name to use in a `column` = 'value' test comparison.
$value
REQUIRED
The value to use in a `column` = 'value' test comparison.
-------
RETURNS
-------
1 if row(s) was/were deleted successfully
0 (zero) if deletion was not successful or if no rows were matched.
--------------
USAGE EXAMPLES
--------------
-------------------------------------------------------
Example 1: Remove Row from 'MyTable' Where 'id' is '10'
-------------------------------------------------------
<? $ret = &db_delete_row($dbobj, 'MyTable', 'id', '10'); ?>
--------
SEE ALSO
--------
MODULES
PTMDB
FUNCTIONS
PTMDB - db_connect()
PTMDB - db_delete_row_like()
PTMDB - db_delete_row_where()
|