View / Download this file.
--------------------------------------------
PTMDB MODULE - db_update_row_like() FUNCTION
--------------------------------------------
------------
USAGE FORMAT
------------
Where $ret is a return value of 1 or 0 (zero):
$ret = &db_update_row_like($db_object, $table, $column, $value,
@change_values);
$ret = &db_update_row_like($db_object, $table, $column, $value,
$v1, $v2, ... );
-----------
DESCRIPTION
-----------
Updates a given database table row where $column LIKE $value.
ALL ROW VALUES MUST BE PROVIDED IN @change_values OR EMPTIES WILL BE CLEARED
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 in which you would like to update row information.
$column
REQUIRED
The column name to use in a `column` LIKE 'value' test comparison.
$value
REQUIRED
The value to use in a `column` LIKE 'value' test comparison.
@change_values
REQUIRED
A list of the values (in proper column order) you would like to change in
the table row. This may be either a Perl @array or simply a comma
separated list of values.
ALL ROW VALUES MUST BE PROVIDED OR EMPTIES WILL BE CLEARED.
-------
RETURNS
-------
1 if row was updated successfully
0 (zero) if row was not updated successfully or no row matches were found.
--------------
USAGE EXAMPLES
--------------
----------------------------------------------------------------------------
Example 1: Update an 'id','name' Row in 'MyTable' Where 'id' Begins with '1'
----------------------------------------------------------------------------
<?
$ret = &db_update_row_like($dbobj, 'MyTable', 'id', '1%', '10', 'John');
?>
--------
SEE ALSO
--------
MODULES
PTMDB
FUNCTIONS
PTMDB - db_connect()
PTMDB - db_update_row()
PTMDB - db_update_row_hash_like()
PTMDB - db_update_row_where()
|