الإصدار: v2.6.0
get
جلب سجل واحد من جدول.
get($table, $columns, $where)
get($table, $join, $columns, $where)
القيمة المُعادة
[mixed] أول سجل مطابق كقيمة عددية أو مصفوفة ترابطية.
$email = $database->get("account", "email", [
"user_id" => 1234
]);
// مثال على النتيجة:
// "foo@bar.com"
$profile = $database->get("account", [
"email",
"gender",
"location"
], [
"user_id" => 1234
]);
// مثال على النتيجة:
// array(
// "email" => "foo@bar.com",
// "gender" => "female",
// "location" => "earth"
// )
$data = $database->get("post", [
"[>]account" => "user_id"
], [
"post.content",
"account.user_name",
"account.location"
], [
"ORDER" => "post.rate"
]);
// مثال على النتيجة:
// array(
// "content" => "A new day",
// "user_name" => "foo",
// "location" => "earth"
// )