thinkphp的model的where查询时有两种形式. $model->field('id')->where('customer_num is null or customer_num=""')->select(); $map['pid']=$ss; $map['type']=$s1; $list=$Region->field('id')->where($map)->select();
首先,我们来看一下tp框架里面的查询方法: 查询有很多种,代码如下: <?php namespace Admin\Controller; use Think\Controller; class MainController extends Controller { public function showList() { echo "大苹果商城"; } public function test() { //数据访问 //造模型对象 $nation = D("Nation