From 4962f845e5d4c49a3a82c33aae016411fe6c9271 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 3 Nov 2002 11:22:13 +0000 Subject: [PATCH] bug 629630 --- ChangeLog | 4 ++++ tbl_create.php3 | 11 ----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc07d1f39..83b1051bc 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ $Id$ $Source$ +2002-11-03 Loïc Chapeaux + * tbl_create.php3: bug 629630 auto-increment key does not have to + be the primary key + 2002-11-02 Marc Delisle * libraries/sqlparser.lib.php3: correct detection of PHP 4.2.x * main.php3, lang/*.php3: PHP 4.2.3 warning diff --git a/tbl_create.php3 b/tbl_create.php3 index ecf6aa066..9ac21d94a 100755 --- a/tbl_create.php3 +++ b/tbl_create.php3 @@ -87,17 +87,6 @@ if (isset($submit)) { } if ($field_extra[$i] != '') { $query .= ' ' . $field_extra[$i]; - // An auto_increment field must be use as a primary key - if ($field_extra[$i] == 'AUTO_INCREMENT' && isset($field_primary)) { - $primary_cnt = count($field_primary); - for ($j = 0; $j < $primary_cnt && $field_primary[$j] != $i; $j++) { - // void - } // end for - if ($field_primary[$j] == $i) { - $query .= ' PRIMARY KEY'; - unset($field_primary[$j]); - } // end if - } // end if (auto_increment) } $query .= ', '; $sql_query .= $query;