Version: v2.4.0
has
Check whether any matching record exists in a table.
has($table, $where)
table [string]
The name of the table to query.
where [array]
The WHERE clause used to check for matching records.
has($table, $join, $where)
table [string]
The name of the table to query.
join [array]
The join definitions used to combine related tables.
where [array]
The WHERE clause used to check for matching records.
Return Value
[bool]
true if at least one matching record exists, false otherwise.$isAccount = $database->has("account", [
"AND" => [
"OR" => [
"user_name" => "foo",
"email" => "foo"
],
"password" => "12345"
]
]);
if ($isAccount) {
echo "The password is correct.";
} else {
echo "Invalid password.";
}