简体中文
版本: v2.3.0

has

检查数据表中是否存在匹配记录。

has($table, $where)
has($table, $join, $where)
返回值
[bool] 如果至少存在一条匹配记录,则返回 true;否则返回 false
$isAccount = $database->has("account", [
	"AND" => [
		"OR" => [
			"user_name" => "foo",
			"email" => "foo"
		],
		"password" => "12345"
	]
]);

if ($isAccount) {
	echo "密码正确。";
} else {
	echo "密码无效。";
}