tp3.2 分析打印查询sql语句

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/qq_41399976/article/details/100514572
  1. $res_exi = u s e r c o u p o n > f e t c h S q l ( ) > w h e r e ( u s e r i d = " . user_coupon->fetchSql()->where('user_id="'. user_id.’" AND coupon_id="’.$id.’" ')->find();

  2. u s e r > g e t L a s t S q l ( ) ; user->getLastSql(); 或 user->_sql();

  3. 配置中数据库开启调试模式

‘DB_DEBUG’ => true, //开启调试模式 记录SQL日志,Runtime/Logs查看日志记录

  1. M()->_sql();

猜你喜欢

转载自blog.csdn.net/qq_41399976/article/details/100514572