当前位置: 首页 > 工具软件 > TP-COUPON > 使用案例 >

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

吕皓
2023-12-01

1.  $res_exi = $user_coupon->fetchSql()->where('user_id="'.$user_id.'" AND coupon_id="'.$id.'" ')->find();

2.   $user->getLastSql();  或$user->_sql();

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

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

4. M()->_sql();

 类似资料: