查询关键字为“UNION”时,返回了意外的结果。
Controller代码如下:
$where['post_type'] = array('like', '%UNION%');
$where['post_from'] = array('like', '%UNION%');
$where['_logic'] = 'or';
$count = $Blog->where($where)->count();
但是在Trace中看到生成的SQL语句如下:
SELECT COUNT(*) AS tp_count FROM `wu_blog` WHERE `post_type` LIKE '' OR `post_from` LIKE '' LIMIT 1 [ RunTime:0.0005s ]
查询的关键字在生成的SQL语句中消失了??
最佳答案
		