Версія: 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"
// )