开始

Where 语法

查询

事务

高级

PDO 对象

Debug

数据库信息

版本: 1.1.3

get

从表中仅获取一条记录

get($table, $columns, $where)
返回: [string/array] 返回这些字段的数据。
此方法仅获取一条记录。
$email = $database->get("account", "email", [
	"user_id" => 1234
]);

// $email = "foo@bar.com"

$profile = $database->get("account", [
	"email",
	"gender",
	"location"
], [
	"user_id" => 1234
]);

// $profile = array(
// 	"email" => "foo@bar.com",
// 	"gender" => "female",
// 	"location" => "earth"
// )