Zend_Db_Table返回查询记录集有关问题
程序员文章站
2022-06-11 11:55:11
...
Zend_Db_Table返回查询记录集问题
$dbTable = new Zend_Db_Table('client_info');
$select = $dbTable->select()
->from('client_info');
return count($dbTable->fetchAll($select)->toArray());
代码如上,当client_info表里的数据达到十万条以上时就无法查询到记录条数,求各位大虾指教!小弟刚上路,先谢谢各位了
------解决方案--------------------
$dbTable = new Zend_Db_Table('client_info');
$select = $dbTable->select()
->from('client_info', 'count(*)');
return $dbTable->getAdapter()->fetchOne($select);
$dbTable = new Zend_Db_Table('client_info');
$select = $dbTable->select()
->from('client_info');
return count($dbTable->fetchAll($select)->toArray());
代码如上,当client_info表里的数据达到十万条以上时就无法查询到记录条数,求各位大虾指教!小弟刚上路,先谢谢各位了
------解决方案--------------------
$dbTable = new Zend_Db_Table('client_info');
$select = $dbTable->select()
->from('client_info', 'count(*)');
return $dbTable->getAdapter()->fetchOne($select);
相关文章
相关视频
上一篇: mysql语句哪位高手帮看看是什么意思啊
下一篇: php 多条json 转换为数组