当前位置: 首页 > 工具软件 > PHP Debug Bar > 使用案例 >

php调试数据库,debug-调试-Medoo - 高效的轻量级PHP数据库框架, 提高开发效率!

卢德惠
2023-12-01

Debug

输入sql语句,但不执行

debug()

Return: 开启Medoo调试模式

输出sql语句,不需要使用echo或其它方法。调试完成请移除此代码$database->debug()->select("bccount", [ "user_name", "email"], [ "user_id[ 20]);// Will output:// SELECT "user_name","email" FROM "bccount" WHERE "user_id" < 20// [Multiple situation]// Output nothing$database->insert("account", [ "user_name" => "foo", "email" => "foo@bar.com"]);// Will output the generated query$post_id = $database->debug()->get("post", "post_id", ["user_name" => "foo"]);// Be careful, this query will be executed.$database->update("account", [ "level[+]" => 5, "post" => $post_id], [ "user_name" => "foo"]);

 类似资料: