View / Download this file.
------------------------------------------------
PTMDB MODULE - db_get_row_count_where() FUNCTION
------------------------------------------------
------------
USAGE FORMAT
------------
Where $count is the returned number of rows:
$count = &db_get_row_count_where($db_object, $table_name);
$count = &db_get_row_count_where($db_object, $table_name, $where);
-----------
DESCRIPTION
-----------
Returns the number of rows in a given database table. Optionally, can
return only the number of rows that match any given WHERE comparison
statement. Set $where to use this comparison option. Primarily to be
used when more than one "=" or "LIKE" comparison needs to be used.
---------
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_name
REQUIRED
The name of the table from which you would like to pull row information.
$where
OPTIONAL
Any SQL "WHERE" statement to be used as part of the "SELECT" statement.
e.g. "((`column1` = 'value1') AND (`column2` = 'value2'))"
-------
RETURNS
-------
The number of rows in the given database table, optionally returning only
the number of "WHERE" comparison statement matches.
--------
SEE ALSO
--------
MODULES
PTMDB
FUNCTIONS
PTMDB - db_select_database()
PTMDB - db_get_row_count()
PTMDB - db_get_row_count_like()
|