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
Switch to threaded view of this topic Create a new topic Submit Reply
add_index() function broken in upgrade script [message #16938] Wed, 03 March 2004 14:51 Go to next message
malc is currently offline  malc   United Kingdom
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);
Re: add_index() function broken in upgrade script [message #16962 is a reply to message #16938] Sat, 06 March 2004 21:26 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS, thanks.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Sat Nov 30 05:57:05 GMT 2024

Total time taken to generate the page: 0.02543 seconds