开始

Where 语法

查询

事务

高级

PDO 对象

Debug

数据库信息

版本: 1.1.3

has

确定目标数据是否存在

has($table, $where)
has($table, $join, $where)
返回: [boolean] 目标数据存在则返回 True ,否则返回 False 。
Where 参数是必需的。此方法是验证密码的最好方式。
if ($database->has("account", [
	"AND" => [
		"OR" => [
			"user_name" => "foo",
			"email" => "foo"
		],
		"password" => "12345"
	]
]))
{
	echo "Password is correct.";
}
else
{
	echo "Password error.";
}