version: 2.1.12
has
Determine whether the target data existed from the table.
has($table, $where)
table [string]
The table name.
where [array]
The WHERE clause to filter records.
has($table, $join, $where)
table [string]
The table name.
join [array]
Table relativity for tables.
where [array]
The WHERE clause to filter records.
Return: [boolean] Boolean value for founded data.
$isAccount = $database->has("account", [ "AND" => [ "OR" => [ "user_name" => "foo", "email" => "foo" ], "password" => "12345" ] ]); if ($isAccount) { echo "The password is correct."; } else { echo "Invaild password."; }