目录

last_query

优质
小牛编辑
133浏览
2023-12-01

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')