开启debug,检查sql语句,复制sql语句在数据库中执行,看看有没有结果

解决方案 »

  1.   

    $model = M("Employeeinfo");
    $results = $model->where($condition)->select();
    echo $results->getlastSql();
      

  2.   

    加上 $condition['_logic'] = 'AND'; 
    $model = M("Employeeinfo");
    $results = $model->where($condition)->select(); 
    $model->getlastSql();看看呢
      

  3.   

    你select方法里面加上个false就好了。他就不执行SQL语句了。转而把SQL语句打印出来。
    $model = M("Employeeinfo")->select(false);