multiple segments for primary key

This commit is contained in:
Marc Delisle
2002-07-01 20:12:48 +00:00
parent a8faed8757
commit e87741823e
2 changed files with 6 additions and 2 deletions

View File

@@ -12,6 +12,8 @@ $Source$
* tbl_properties_links.php3, db_details_links.php3: better vertical spacing
* tbl_properties.php3, db_details.php3: misplaced bullet
* tbl_properties.php3: add field list on the query page
* pdf_schema.php3: color for all segments of primary key, thanks to
Joshua Eichorn (jeichorn at joshuaeichorn.com)
2002-07-01 Alexander M. Turek <rabus@users.sourceforge.net>
* sql.php3: Fixed bug #575867 (Error with limit or load in the table name).

View File

@@ -319,6 +319,7 @@ class PMA_RT_Table
var $fields = array();
var $height_cell = 6;
var $x, $y;
var $primary = array();
/**
@@ -390,7 +391,7 @@ class PMA_RT_Table
reset($this->fields);
while (list(, $field) = each($this->fields)) {
if($field == $this->primary){$pdf->SetFillColor(215,121,123);}
if(in_array($field,$this->primary)){$pdf->SetFillColor(215,121,123);}
if($field == $this->displayfield){$pdf->SetFillColor(142,159,224);}
$pdf->PMA_PDF_cellScale($this->width, $this->height_cell, ' ' . $field, 1, 1, 'L', 1);
$pdf->PMA_PDF_setXScale($this->x);
@@ -462,7 +463,7 @@ class PMA_RT_Table
if(mysql_num_rows($result)>0){
while ($row = PMA_mysql_fetch_array($result)) {
if($row['Key_name'] == 'PRIMARY'){
$this->primary = $row['Column_name'];
$this->primary[] = $row['Column_name'];
}
}
}
@@ -778,6 +779,7 @@ class PMA_RT
$pdf->SetDisplayMode('fullpage');
$pdf->Output($db . '_' . $pdf_page_number . '.pdf', TRUE);
//$pdf->Output('', TRUE);
} // end of the "PMA_RT_showRt()" method