Get Started

Upgrade

Where Syntax

Query

Aggregation

Fetch

Transaction

Management

Advanced

Raw object

PDO object

Debug

Information

version: 1.7.10

What's New v1.7

New create() and drop() API

Medoo provided two API for creating table and dropping table for better table management on the project.

$database->create("account", [
	"id" => [
		"INT",
		"NOT NULL",
		"AUTO_INCREMENT",
		"PRIMARY KEY"
	],
	"first_name" => [
		"VARCHAR(30)",
		"NOT NULL"
	]
]);

$database->drop("account");

Index mapping for select output

It's now able to set column name as the index key for the result.

$data = $database->select("post", [
	"user_id" => [
		"nickname",
		"location",
		"email"
	]
]);

// Output data
[
	10: {
		nickname: "foo",
		location: "New York",
		email: "foo@example.com"
	},

	12: {
		nickname: "bar",
		location: "New York",
		email: "bar@medoo.in"	
	}
]

Improvements

Bug Fixed