Medoo

开始

Where 语句

查询

Transaction

原生SQL查询

PDO object

Debug

数据库信息

last_query

返回最后一条执行的SQL语句.

last_query()
Return: [string]
和log()很相似,但只返回最后一次执行的SQL语句
$database->select("account", [
    "user_name",
    "email"
], [
    "user_id[<]" => 20
]);

$database->insert("account", [
    "user_name" => "foo",
    "email" => "foo@bar.com"
]);

echo $database->last_query();
// INSERT INTO "account" ("user_name", "email") VALUES ('foo', 'foo@bar.com')