本文整理汇总了PHP中query::get_query_elements方法的典型用法代码示例。如果您正苦于以下问题:PHP query::get_query_elements方法的具体用法?PHP query::get_query_elements怎么用?PHP query::get_query_elements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类query
的用法示例。
在下文中一共展示了query::get_query_elements方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: metadata_table
$element_fields[] = $rw->report_element_field_list[$j];
}
}
$field = null;
for ($j = 0; $j < count($rw->report_element_metadata_mapping); $j++) {
if ($rw->report_element_metadata_mapping[$j]->id * 1 === $element_fields[0]->metadata_field_id * 1) {
$field = $rw->report_element_metadata_mapping[$j];
}
}
$table = ormlib::get_from_instance(new metadata_table(), array("id"), array($field->metadata_table_id));
$query_elements = query::get_query_elements($table->metadata_id, $element_fields);
for ($j = 0; $j < count($field_list_key); $j++) {
$metadata_field = report_wrapper::get_from_instance(new metadata_field(), array("id"), array($field_list_key[$j]));
$metadata_table = report_wrapper::get_from_instance(new metadata_table(), array("id"), array($metadata_field->metadata_table_id));
if ($metadata_table->id * 1 !== $table->metadata_id) {
$query_elements1 = query::get_query_elements($metadata_table->metadata_id);
$query_elements["from"] = array_merge($query_elements["from"], $query_elements1["from"]);
$query_elements["relations"] = array_merge($query_elements["relations"], $query_elements1["relations"]);
}
}
//Get Datastructur for Query for metadata
$query_fields = implode($query_elements["fields"], ",");
$query_from = implode($query_elements["from"], ",");
$query_elements["relations"] = array_merge($query_elements["relations"], query::get_field_relations($field_list_key, $field_list_value));
$query_elements["relations"] = array_merge($query_elements["relations"], query::get_meta_relations($field_list_key, $table->metadata_id));
$query_relation = implode($query_elements["relations"], " AND ");
$query = "SELECT {$query_fields} from {$query_from} WHERE {$query_relation}";
$result = $dbconnection->do_query_data_response($query);
$list = array();
while ($myrow = mysql_fetch_array($result)) {
$arr = array();