where($map"/> where($map">

thinkphp怎么打印sql语句

WBOY
Release: 2016-06-13 11:59:40
Original
1580 people have browsed it

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();

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!