2013-03-28 07:33:02 +01:00
|
|
|
<?php
|
|
|
|
class Application_Model_ClientStat extends Zend_Db_Table_Abstract
|
|
|
|
{
|
2013-04-18 16:47:00 +02:00
|
|
|
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)
|
|
|
|
{
|
2013-04-18 16:47:00 +02:00
|
|
|
$sql = $this->select()->where("$col_name='$col_val'");
|
2013-03-28 07:33:02 +01:00
|
|
|
$rows = $this->fetchAll($sql);
|
|
|
|
return count($rows);
|
|
|
|
}
|
|
|
|
}
|