extranet/application/models/ClientStat.php

18 lines
429 B
PHP
Raw Normal View History

2013-03-28 07:33:02 +01:00
<?php
class Application_Model_ClientStat extends Zend_Db_Table_Abstract
{
protected $_name = 'client_stat';
2013-03-28 07:33:02 +01:00
/**
* 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'");
2013-03-28 07:33:02 +01:00
$rows = $this->fetchAll($sql);
return count($rows);
}
}