Function ze\row::exists()

In PHP:
ze\row::exists(
$table, $ids, $ignoreMissingColumns = false
)

Description

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

Parameters

$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.

Return Value

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

Example

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

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