View / Download this file.
------------------------------------
PTMDB MODULE - db_add_row() FUNCTION
------------------------------------
------------
USAGE FORMAT
------------
Where $ret is a return value of 1 or 0 (zero):
$ret = &db_add_row($db_object, $table, @values);
$ret = &db_add_row($db_object, $table, $val1, $val2, $val3, ...);
-----------
DESCRIPTION
-----------
Adds a row to a given database table.
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 to which you would like to add row information.
@values
REQUIRED
A list of the values (in proper column order) you would like to add to
the new table row. This may be either a Perl @array or simply a comma
separated list of values.
-------
RETURNS
-------
1 if row was added successfully
0 (zero) if row was not added successfully.
--------------
USAGE EXAMPLES
--------------
---------------------------------------------------
Example 1: Add a New Row with 3 Values to 'MyTable'
---------------------------------------------------
<? $ret = &db_add_row($dbobj, 'MyTable', 'val1', 'val2', 'val3'); ?>
--------
SEE ALSO
--------
MODULES
PTMDB
FUNCTIONS
PTMDB - db_connect()
PTMDB - db_add_row_hash()
|