18 lines
429 B
PHP
18 lines
429 B
PHP
|
<?php
|
||
|
class Application_Model_ClientStat extends Zend_Db_Table_Abstract
|
||
|
{
|
||
|
protected $_name = 'client_stat';
|
||
|
|
||
|
/**
|
||
|
* Retourne quantité des lignes de certain valeur
|
||
|
* @param string $col_name
|
||
|
* @param string $col_val
|
||
|
* @return number
|
||
|
*/
|
||
|
public function statCnt($col_name, $col_val)
|
||
|
{
|
||
|
$sql = $this->select()->where("$col_name='$col_val'");
|
||
|
$rows = $this->fetchAll($sql);
|
||
|
return count($rows);
|
||
|
}
|
||
|
}
|