thinkphp怎么打印sql语句
程序员文章站
2024-02-09 09:32:28
...
thinkphp如何打印sql语句
thinkphp如何打印sql语句?比如 $member = M("member"); $map['id'] = 1; $result = $member->where($map)->delete();
SQL语句应该是delete * from table member where id = 1;
怎样输出这个sql判断?我记得有个函数,但忘了是哪个了
------解决方案--------------------
getLastSql
------解决方案--------------------
echo M("member")->getLastSql();
thinkphp如何打印sql语句?比如 $member = M("member"); $map['id'] = 1; $result = $member->where($map)->delete();
SQL语句应该是delete * from table member where id = 1;
怎样输出这个sql判断?我记得有个函数,但忘了是哪个了
------解决方案--------------------
getLastSql
------解决方案--------------------
echo M("member")->getLastSql();
相关文章
相关视频
上一篇: Flash务实主义(二)最短路径原则(上)_MySQL
下一篇: 序列化与反序列化(2)