FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » add_index() function broken in upgrade script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
add_index() function broken in upgrade script [message #16938] Wed, 03 March 2004 14:51 Go to previous message
malc is currently offline  malc   United Kingdom
Messages: 3
Registered: November 2002
Location: UK
Karma:
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);
[Message index]
 
Read Message
Read Message
Previous Topic: Post notifications
Next Topic: Changes on a posting in a moderated forum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 15:55:03 GMT 2024

Total time taken to generate the page: 0.04963 seconds