目录

log

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

LOG

返回所有执行的查询。

log()

Return: 开启Medoo调试模式

可以用此函数来查询、调试SQL语句

$database->select("account", [    "user_name",    "email"], [    "user_id[ 20]);$database->insert("account", [    "user_name" => "foo",    "email" => "foo@bar.com"]);var_dump( $database->log() );// array(2) {//  [0]=> string(62) "SELECT "user_name","email" FROM "account" WHERE "user_id"  string(74) "INSERT INTO "account" ("user_name", "email") VALUES ('foo', 'foo@bar.com')"// }