ze\row::exists()
ze\row::exists($table, $ids, $ignoreMissingColumns = false)
Checks whether a given row in a given table exists in the database.
$table
The name of a table to check.
You do not need to add the DB_PREFIX
, this will be added automatically.
$ids
An associative array of keys (column names) to values to search for; see Format of $id and $values for Database Functions for details.
Returns true if the given row exists or false if it does not.
checkRowExists('users', array('username' => 'Bob'));
Checks to see if a User called "Bob" exists.