Ejemplo n.º 1
0
 /** Gets TLabelMeaning object by property $property_name with value $property_value.
  * @return TLabelMeaning or NULL in case of error
  */
 public static function getLabelMeaning($property_name, $property_value, $meaning_obj = NULL)
 {
     global $LINK_DB;
     $query = "SELECT * FROM label_meaning WHERE `{$property_name}`='{$property_value}'";
     $result = $LINK_DB->query_e($query, "Query failed in " . __METHOD__ . " in file <b>" . __FILE__ . "</b>, string <b>" . __LINE__ . "</b>");
     if ($LINK_DB->query_count($result) == 0) {
         return NULL;
     }
     $labelMeaning_arr = array();
     while ($row = $result->fetch_object()) {
         /*
         	    if ($meaning_obj == NULL)
         	  	$meaning_obj = TMeaning::getByID($row->meaning_id);
         */
         $labelMeaning_arr[] = new TLabelMeaning(TLabel::getByID($row->label_id), $meaning_obj);
     }
     return $labelMeaning_arr;
 }