Menu

#2511 (ok 2.11.1) Table Print preview: Missing column header

2.11.0
fixed
1
2013-06-11
2007-08-20
No

Show a table structure with column comments (available in MySQL 4.1 and 5.x). Display the "Print preview" view: The "Comment" column for the table structure has no header (see attached image).

Reason: There is one less header column (TH) than content columns (TD); or differently: There is no header cell generated for the "Comment" column title, but content cells for the table column comments.

Discussion

  • Mario Rohkrämer

    Missing comment header

     
  • Mario Rohkrämer

    Logged In: YES
    user_id=678046
    Originator: YES

    Suggested fix:

    [v2.11.0] tbl_printview.php, lines 263-270:

    if ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100) {
    echo ' <td>';
    $comments = PMA_getComments($db, $table);
    if (isset($comments[$field_name])) {
    echo htmlspecialchars($comments[$field_name]);
    }
    echo '&nbsp;</td>' . "\n";
    }

    This is executed "if comments are configured *OR MySQL is at least version 4.1*".

    [v2.11.0] tbl_printview.php, lines 173-175:

    if ($cfgRelation['commwork']) {
    echo ' <th>' . $strComments . '</th>' . "\n";
    }

    This is executed "if comments are configured". The check "if MySQL is at least version 4.1" seems to be missing. It should probably be changed to:

    if ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100) {
    echo ' <th>' . $strComments . '</th>' . "\n";
    }

     
  • Marc Delisle

    Marc Delisle - 2007-09-05
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-09-05
    • milestone: 741410 --> 2.11.0
    • priority: 5 --> 1
    • summary: Table Print preview: Missing "Comment" column header --> (ok 2.11.1) Table Print preview: Missing column header
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-09-05

    Logged In: YES
    user_id=210714
    Originator: NO

    Merged, thanks.

     
  • Marc Delisle

    Marc Delisle - 2007-09-20
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed