本文整理匯總了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;
}