problem with getting comments when creating a new table under MySQL 4.1.x with extension mysql

This commit is contained in:
Marc Delisle
2005-03-10 19:49:09 +00:00
parent 41ae394e2e
commit c84507f8d9
3 changed files with 15 additions and 4 deletions

View File

@@ -429,10 +429,12 @@ function PMA_getComments($db, $table = '') {
// MySQL 4.1.x native column comments
if (PMA_MYSQL_INT_VERSION >= 40100) {
$fields = PMA_DBI_get_fields($db, $table);
foreach($fields as $key=>$field) {
$tmp_col = $field['Field'];
if (!empty($field['Comment'])) {
$native_comment[$tmp_col] = $field['Comment'];
if ($fields) {
foreach($fields as $key=>$field) {
$tmp_col = $field['Field'];
if (!empty($field['Comment'])) {
$native_comment[$tmp_col] = $field['Comment'];
}
}
}
}