使用WHERE方法奇异问题

浏览:480 发布日期:2014/03/24 分类:求助交流 关键字: 求大神解答啊神啊救救我吧
情况是这样我使用TP框架的where方法进行多条件产生奇怪的现象查询结果返回为空。
测试了几次情况是这样的:
1、打印出来语句可执行
2、删除where里面的链接条件时TP可执行

打印出来语句如下:
SELECT `id`,`name`,`coverimage`,`description`,`keywords`,`showtime` FROM `db_video_cat` WHERE ( type like '%12%' and isopen='1' ) ;
方法封装入下:
function getCatVideo($id,$limit){

$catVideo = $this->field("id,name,coverimage,description,keywords,showtime")
->where("type like '%$id%' and db_video_cat.isopen='1'")
->limit($limit)
->select();
echo $this->getLastSql();
return $catVideo;

}

为什么会数据丢失呢??求解答,我用的TP好像是3.1.3在这个版本中为什么会产生这种问题
最佳答案
评论( 相关
后面还有条评论,点击查看>>