bug 629630
This commit is contained in:
@@ -6,6 +6,10 @@ $Id$
|
|||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
|
||||||
|
2002-11-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* tbl_create.php3: bug 629630 auto-increment key does not have to
|
||||||
|
be the primary key
|
||||||
|
|
||||||
2002-11-02 Marc Delisle <lem9@users.sourceforge.net>
|
2002-11-02 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/sqlparser.lib.php3: correct detection of PHP 4.2.x
|
* libraries/sqlparser.lib.php3: correct detection of PHP 4.2.x
|
||||||
* main.php3, lang/*.php3: PHP 4.2.3 warning
|
* main.php3, lang/*.php3: PHP 4.2.3 warning
|
||||||
|
@@ -87,17 +87,6 @@ if (isset($submit)) {
|
|||||||
}
|
}
|
||||||
if ($field_extra[$i] != '') {
|
if ($field_extra[$i] != '') {
|
||||||
$query .= ' ' . $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 .= ', ';
|
$query .= ', ';
|
||||||
$sql_query .= $query;
|
$sql_query .= $query;
|
||||||
|
Reference in New Issue
Block a user