Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试对推进标准做一个非常简单的 sql 查询,如下所示:
SELECT count(id_user) FROM myTable WHERE id_page = 5
我没有找到有关文档的信息。
你有想法吗??
$c = new Criteria(); $c->add(myTablePeer::ID_PAGE,5); $count = myTablePeer::doCount($c);
如果您想根据您当前的 ModelCriteria 发出 SELECT COUNT(*) 您也可以执行
$yourCriteria->count();
这将返回结果的数量。