countEntry

Navigation:  Development > Function Reference > Model >

countEntry

Previous pageReturn to chapter overviewNext page

Count row of a table based on condition.

 

App::Model(MODEL)->countEntry(CONDITION);

 

Return integer value of row count.
 
For example:

 

$cnt = App::Model('Page')->countEntry(' id > 5');
pr($cnt);