Medoo

开始

更新日志

Where 语句

查询

聚合

Fetch

事务

原生SQL查询

Raw object

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.";
}