Medoo

开始

Where 语句

查询

Transaction

原生SQL查询

PDO object

Debug

数据库信息

has

确定数据是否存在

has($table, $where)
has($table, $join, $where)
Return: [boolean] 返回 TRUE 或者 FALSE.
可用于做密码判断。
if ($database->has("account", [
    "AND" => [
        "OR" => [
            "user_name" => "foo",
            "email" => "foo"
        ],
        "password" => "12345"
    ]
]))
{
    echo "Password is correct.";
}
else
{
    echo "Password error.";
}