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;