Update and display column comments in Add/Edit Fieldmode and CREATE table mode. Display comments in table structure (optional) with underlined CSS-mouseovers. Display comments in browser mode (optional), both in vertical and horizontal display mode. Keep column comments in synch, when DROPping/ALTERing and moving/copying tables.
This commit is contained in:
21
sql.php3
21
sql.php3
@@ -437,6 +437,27 @@ else {
|
||||
} else { // not $is_select
|
||||
$unlim_num_rows = 0;
|
||||
} // end rows total count
|
||||
|
||||
// garvin: if a table or database gets dropped, check column comments.
|
||||
if (isset($purge)) {
|
||||
include('./libraries/relation.lib.php3');
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
if ($cfgRelation['commwork']) {
|
||||
if (isset($table) && isset($db) && !empty($table) && !empty($db)) {
|
||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||
$rmv_rs = PMA_query_as_cu($remove_query);
|
||||
unset($rmv_query);
|
||||
} elseif (isset($db) && !empty($db)) {
|
||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_comments'])
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||
$rmv_rs = PMA_query_as_cu($remove_query);
|
||||
unset($rmv_query);
|
||||
}
|
||||
} // end if relation-stuff
|
||||
} // end if ($purge)
|
||||
} // end else "didn't ask to see php code"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user