Get Started

Medoo 1.4

Where Syntax

Query

Fetch

Transaction

Advanced

PDO object

Debug

Information

version: 1.4.5

get

Get only one record from table

get($table, $columns, $where)
Return: [string/array/int/object] Return the data of the column.
$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"
// )

$data = $database->get("post", [
	"[>]account" => "user_id"
], [
	"post.content",
	"account.user_name",
	"account.location"
], [
	"ORDER" => "post.rate"
]);

// $data = array(
// 	"content" => "A new day",
// 	"user_name" => "foo",
// 	"location" => "earth"
// )