数据库存操作条件不会被加载到sql语句中

浏览:308 发布日期:2016/06/26 分类:求助交流 关键字: where map 条件不会被加载到sql语句中
用法:
$map['parentid'] =2;
$listdata = $M->where($map)->distinct(true)->field('id ,name')->select();
var_dump(lastsql());
结果:
<small>string</small> <font color='#cc0000'>'SELECT DISTINCT `id`,`name` FROM `wp_shop_goods_category` '</font> <i>(length=59)</i>

最佳答案
评论( 相关
后面还有条评论,点击查看>>