コード例 #1
0
 /**
  * returns an array[] filled with entities
  * the entities are filled with metadata and the values
  * you can use this function only if the query retuns more than one row
  * @param bool $meta_data_is_qry if set to true use the query for the metadata
  * @return array[]
  * @access protected
  */
 function getReport($qry)
 {
     $meta_data = $this->mysql_conn->metaData($qry);
     $data = $this->mysql_conn->resultTable($qry);
     $ret_arr = array();
     //print_r($data);
     #count how many rows are returned and for every row create an entity
     #fill every entity with the metadata and values
     for ($i = 0; $i < count($data); $i++) {
         $ret_ent = new BaseEntity();
         $ret_ent->setProperties($meta_data, $data[$i]);
         $ret_arr[$i] = $ret_ent;
     }
     return $ret_arr;
 }