本文整理汇总了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;
}