报错:
$map['name'] = [
'like', '%小明%'
];
$data = Db::name('table')->where($map)->select();
正确写法:
$map[] = [
'name', 'like', '%小明%'
];
$data = Db::name('table')->where($map)->select();
$map['name'] = [
'like', '%小明%'
];
$data = Db::name('table')->where($map)->select();
$map[] = [
'name', 'like', '%小明%'
];
$data = Db::name('table')->where($map)->select();
本文标题:thinkphp5.* 数组查询
本文链接:https://www.haomeiwen.com/subject/rwmsrqtx.html
网友评论