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


PHP query::get_meta_relations_2方法代碼示例

本文整理匯總了PHP中query::get_meta_relations_2方法的典型用法代碼示例。如果您正苦於以下問題:PHP query::get_meta_relations_2方法的具體用法?PHP query::get_meta_relations_2怎麽用?PHP query::get_meta_relations_2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在query的用法示例。


在下文中一共展示了query::get_meta_relations_2方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_meta_relations_1

 public static function get_meta_relations_1($metadata_id, $metadata_id1)
 {
     global $dbconnection;
     $query = "select \n                metadata_relation.metadata_field_id1,\n                metadata_relation.metadata_field_id2\n            from \n                metadata_relation, \n                metadata_table as metadata_table1, \n                metadata_field as metadata_field1, \n                metadata_table as metadata_table2, \n                metadata_field as metadata_field2\n            where \n                metadata_relation.metadata_field_id1 = metadata_field1.id and \n                metadata_field1.metadata_table_id = metadata_table1.id and \n                metadata_table1.metadata_id = {$metadata_id} and \n                metadata_relation.metadata_field_id2 = metadata_field2.id and \n                metadata_field2.metadata_table_id = metadata_table2.id and \n                metadata_table2.metadata_id = {$metadata_id1}\n            ";
     $result = $dbconnection->do_query_meta_response($query);
     $fields = array();
     while ($myrow = mysql_fetch_array($result)) {
         $fields[] = array($myrow["metadata_field_id1"], $myrow["metadata_field_id2"]);
     }
     $relations = array();
     foreach ($fields as $field) {
         $relations[] = query::get_meta_relations_2($field[0]) . " = " . query::get_meta_relations_2($field[1]);
     }
     return $relations;
 }
開發者ID:hurricanetx,項目名稱:holmes-bi,代碼行數:15,代碼來源:query.php


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