thinkphp怎么打印sql语句
1个回答
2016-04-17
展开全部
如 $member = M("member");
$map['id'] = 1;
$result = $member->where($map)->delete();
SQL语句应该是delete * from table member where id = 1;
------解决方法--------------------
getLastSql
------解决方法--------------------
echo M("member")->getLastSql();
$map['id'] = 1;
$result = $member->where($map)->delete();
SQL语句应该是delete * from table member where id = 1;
------解决方法--------------------
getLastSql
------解决方法--------------------
echo M("member")->getLastSql();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询