Zend_Db_Table返回查询记录集有关问题

WBOY
Release: 2016-06-13 09:59:13
Original
759 people have browsed it

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);

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!