36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
|
<?php
|
||
|
/*
|
||
|
* To change this template, choose Tools | Templates
|
||
|
* and open the template in the editor.
|
||
|
*/
|
||
|
class Application_Model_RapportsGiants extends Zend_Db_Table_Abstract
|
||
|
{
|
||
|
protected $_name = 'rapports_giants';
|
||
|
|
||
|
public function getReportById($companyId)
|
||
|
{
|
||
|
$sql = $this->select('report')
|
||
|
->where('companyId = ?', $companyId);
|
||
|
$result = $this->getAdapter()->fetchAll($sql);
|
||
|
return ($result);
|
||
|
}
|
||
|
|
||
|
public function getReportByIdAndType($companyId, $type)
|
||
|
{
|
||
|
$sql = $this->select()
|
||
|
->where('companyId = ?', $companyId)
|
||
|
->where('type = ?', $type);
|
||
|
$result = $this->getAdapter()->fetchRow($sql);
|
||
|
return ($result['report']);
|
||
|
}
|
||
|
|
||
|
public function getReportDate($companyId, $type)
|
||
|
{
|
||
|
$sql = $this->select('date')
|
||
|
->where('companyId = ?', $companyId)
|
||
|
->where('type = ?', $type);
|
||
|
$result = $this->getAdapter()->fetchAll($sql);
|
||
|
return ($result);
|
||
|
}
|
||
|
}
|
||
|
?>
|