當前位置: 首頁>>代碼示例>>PHP>>正文


PHP query::get_query_elements方法代碼示例

本文整理匯總了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();
開發者ID:hurricanetx,項目名稱:holmes-bi,代碼行數:31,代碼來源:query_get.php


注:本文中的query::get_query_elements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。