码迷,mamicode.com
首页 > 数据库 > 详细

TP打印输出SQL语句

时间:2019-12-11 00:24:12      阅读:463      评论:0      收藏:0      [点我收藏+]

标签:url   select   style   span   语句   source   nbsp   ast   img   

 

模型 -> getLastSql();

//TP打印SQL语句
$data = $this->field($field)->where($condition)->select();
echo $this->getLastSql();//输出 SELECT `id`,`title`,materialUrl as outerUrl,image as img,`type`,`sort`,`status`,`source` FROM `ims_push` WHERE `type` = 2

return $data ? $data->toArray() : [];

 

TP打印输出SQL语句

标签:url   select   style   span   语句   source   nbsp   ast   img   

原文地址:https://www.cnblogs.com/camg/p/12019956.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!