From e87741823ec81160ab94368cdca166adece1449f Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 1 Jul 2002 20:12:48 +0000 Subject: [PATCH] multiple segments for primary key --- ChangeLog | 2 ++ pdf_schema.php3 | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0c7f25e1..30092786c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -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 * sql.php3: Fixed bug #575867 (Error with limit or load in the table name). diff --git a/pdf_schema.php3 b/pdf_schema.php3 index 023f782c1..4d2c665d4 100644 --- a/pdf_schema.php3 +++ b/pdf_schema.php3 @@ -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