add_index() function broken in upgrade script [message #16938] |
Wed, 03 March 2004 14:51 |
malc
Messages: 3 Registered: November 2002 Location: UK
Karma: 0
|
Junior Member |
|
|
Hi,
Apologies if this has already been brought up / fixed. On upgrading from V2.3.6 I got some errors from add_index() in upgrade.php.
On line 444, the variable $k is referenced as k, leads to 'Undefined constant'. Also the SQL query is constructed as:
DELETE FROM tbl WHERE col='val',col='val' ....
instead of
DELETE FROM tbl WHERE col=val AND col=val ...
Leading to SQL syntax error. Also column types in question are int so should not be quoted.
Hope this helps.
Pseudo patch
444:
- $con .= "{$v}='{$r[k]}',";
+ $con .= "{$v}={$r[$k]} AND ";
446:
- $con = substr($con, 0, -1);
+ $con = substr($con, 0, -4);
|
|
|
|