Medoo

开始

更新日志

Where 语句

查询

聚合

Fetch

事务

管理

原生SQL查询

Raw object

PDO object

Debug

数据库信息

Has

确定目标数据是否存在于表中。

has($table, $where)

has($table, $join, $where)

返回: [boolean] 表示是否找到数据的布尔值。
$isAccount = $database->has("account", [
	"AND" => [
		"OR" => [
			"user_name" => "foo",
			"email" => "foo"
		],
		"password" => "12345"
	]
]);
 
if ($isAccount) {
	echo "密码正确。";
} else {
	echo "密码无效。";
}