Exemplo n.º 1
0
 public static function get_query_elements($metadata_id, $element_fields = array())
 {
     $tables = ormlib::get_list_from_instance(new metadata_table(), array("metadata_id"), array($metadata_id));
     $query_from = query::get_from($tables);
     $fields = query::get_fields($tables);
     $query_relation = query::get_query_relations($fields, $tables);
     $query_fields = query::get_query_fields($fields, $tables, $element_fields);
     return array("fields" => $query_fields, "from" => $query_from, "relations" => $query_relation);
 }