有个奇怪的问题再使用$elib=$this->dao->select('*')->from('equip_lib')->where('delete')->eq(0)->orderby('id asc')->fetchAll(); 反馈Call to a member function fetchAll() on a non-object。
但是改成$elib=$this->dao->select('*')->from('equip_lib')->orderby('id asc')->fetchAll();就能使用。
$tasks = $this->dao->select('consumed')->from(TABLE_TASKESTIMATE)->where('account')->eq($account)->fetchGroup('date','consumed');我用这个语句返回echo $tasks结果是Array,用foreach输出value还是Array。
fetchAll()返回的输出也是Array,改为echo $tasks->consumed的话无输出。
有点理解不了fetch这几个函数的使用方法,求赐教!
但是改成$elib=$this->dao->select('*')->from('equip_lib')->orderby('id asc')->fetchAll();就能使用。
这个语句怎么执行?