为什么php5.3 thinkphp3.22里模糊查询不能用数组啊

浏览:1066 发布日期:2016/11/23 分类:求助交流
$choose= $_POST['choose'];
$content = $_POST['content'];
$M->where(array($choose=>array('like','%'.$content.'%')))->select();
这样写就会报错
<h1>错误的查询条件:[=>Array]</h1>
<div class="content">
<div class="info">
<div class="title">
<h3>错误位置</h3>

$M->where(array($choose.' '.'like'.' '.'"'.'%'.$content.'%'.'"'))->select();这样就不会报错,为什么啊?求解!
最佳答案
评论( 相关
后面还有条评论,点击查看>>