2009年10月28日星期三

Re: [fw-db] Zend_Db_Table and mysql COUNT() function

What rows do you want to count?

If you get a rowset back, you can always call count:

$rowset = $table->fetchAll('foo = "bar"');

echo count($rowset);
// OR
echo $rowset->count();

Does that help? I feel you might have a more specific question, but that
basically is counting an existing rowset.

-ralph


greg606 wrote:
> Hi
> I have a table (Zend_Db_table object) and I want to count rows.
> What is the simplest way to do it? ;)
>
> Regards
> Greg

没有评论: