$value) {
$con['C_NAME'][$i] = '';
$con['DTN'][$i] = $db . "." . $val[0];
$con['DCN'][$i] = $field;
$con['STN'][$i] = $value['foreign_db'] . "." . $value['foreign_table'];
$con['SCN'][$i] = $value['foreign_field'];
$i++;
}
}
$row = PMA_getForeigners($db,$val[0],'','innodb');
if ($row !== false) {
foreach ($row as $field => $value) {
$con['C_NAME'][$i] = '';
$con['DTN'][$i] = $db.".".$val[0];
$con['DCN'][$i] = $field;
$con['STN'][$i] = $value['foreign_db'].".".$value['foreign_table'];
$con['SCN'][$i] = $value['foreign_field'];
$i++;
}
}
}
$ti = 0;
$script_contr = "";
return $script_contr;
}
function get_p_k_contr() {
global $db;
PMA_DBI_select_db($db);
//$tabs = get_tabs();
$tab_pk = array();
// this is not used? :
//$script_contr = "";
return $script_tabs;
}
function get_tab_pos() {
PMA_getRelationsParam();
$stmt = PMA_query_as_cu("SELECT * FROM " . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']), FALSE, PMA_DBI_QUERY_STORE);
if ( $stmt ) // exist table repository
{
while ($t_p = PMA_DBI_fetch_array($stmt, MYSQL_ASSOC)) {
$t_name = $t_p['db_name'] . '.' . $t_p['table_name'];
$tab_pos[ $t_name ]['X'] = $t_p['x'];
$tab_pos[ $t_name ]['Y'] = $t_p['y'];
$tab_pos[ $t_name ]['V'] = $t_p['v'];
$tab_pos[ $t_name ]['H'] = $t_p['h'];
}
}
return isset($tab_pos) ? $tab_pos : NULL;
}
function get_owners() {
$m = array();
$j = 0;
for ( $i=0; $i < sizeof( $GLOBALS['PMD']["OWNER"] ); $i++ ) {
if( ! in_array($GLOBALS['PMD']["OWNER"][$i],$m)) {
$m[$j++] = $GLOBALS['PMD']["OWNER"][$i];
}
}
return $m;
}
?>