Database Function checkRowExists()

function checkRowExists(
$table, $ids, $ignoreMissingColumns = false

Name in Zenario 8



Checks whether a given row in a given table exists in the database.

Where You Can Use It

From Zenario 7.0.0 onwards.



The name of a table to check.


An associative array of keys (column names) to values to search for; see Format of $id and $values for Database Functions for details.


Return Value

Returns true if the given row exists or false if it does not.


Queries will be run against the last database that was connected to. This will be the local database, unless you switch database using a function such as connectGlobalDB() or connectHubDB().


checkRowExists('users', array('username' => 'Bob'));

Checks to see if a User called "Bob" exists.