_table . " where staff= '".$sid."' and Year(date) =".$year." group by Year(date)" ; //echo '
'; $query = Doo::db ()->query ( $sql ); $result = $query->fetch (); return $result; } function statisticsByComPanyYear($year,$sid){ //staff= '".$sid."' and $sql = "select sum(rePrice) as rePrice,sum(agPrice) as agPrice from " . $this->_table . " where Year(date) =".$year." group by Year(date)" ; $query = Doo::db ()->query ( $sql ); $result = $query->fetch (); return $result; } function statisticsByCid($year,$cid){ // $sql = "select sum(rePrice) as rePrice,sum(agPrice) as agPrice from " . $this->_table . " where cid= '".$cid."' and Year(date) =".$year." group by Year(date)" ; $query = Doo::db ()->query ( $sql ); $result = $query->fetch (); return $result; } /* public function getProjectByIdList($projectid){ return $this->find ( array ('where' => "pid= '".$projectid."'", 'asArray' => TRUE ) ); } */ } ?>