示例#1
0
 function getApprLessByIdMonth($idUser, $month)
 {
     $query = $this->con->genericQuery("select l._id,fk_mobile, l.fk_client, DATE_FORMAT( l.date,  '%d/%m/%Y' ) as date, c.name as client, d.description as discipline, l.hours, l.currency, l.value_wo_discount, l.value_discount, l.value_total_user from " . $this->table . " l inner join disciplines d on l.fk_discipline = d._id inner join clients c on l.fk_client = c._id where fk_user = "******" and MONTH(date)='" . $month . "' and fk_less_stat = 2");
     $objReturn = array();
     foreach ($query as $value) {
         $less = new lesson();
         $less->open($value);
         $objReturn[] = $less;
     }
     return $objReturn;
 }