Updated MySql 4->5 [message #31124] |
Mon, 03 April 2006 16:55 |
marten
Messages: 5 Registered: April 2006
Karma: 0
|
Junior Member |
|
|
Hi,
On the server where my Fudforum 2.6.0 (in eGroupWare 1.2.7) is running, they updated mysql from 4 to 5. eGroupWare is just working fine, only I got problems in Fudforum.
I see all Categories and Forums, only when I want to enter a forum I get the next error:
(/data/usr/sviatos/sites/www.sviatoslav.com/HTML/fudforum/3814588639/index.php:131
/data/usr/sviatos/sites/www.sviatoslav.com/HTML/fudforum/3814588639/theme/default/thread.php:305
/data/usr/sviatos/sites/www.sviatoslav.com/HTML/fudforum/3814588639/theme/default/thread.php:328
/data/usr/sviatos/sites/www.sviatoslav.com/HTML/fudforum/3814588639/index.php:414
) 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'reads FROM phpgw_fud_fc_view v INNER JOIN phpgw_fud_forum f ON f.id=v.f ' at line 1
Query: SELECT f.id, f.name, c.name, c.id, CASE WHEN 0 < m.post_stamp AND (fr.last_view IS NULL OR m.post_stamp > fr.last_view) THEN 1 ELSE 0 END AS reads FROM phpgw_fud_fc_view v INNER JOIN phpgw_fud_forum f ON f.id=v.f INNER JOIN phpgw_fud_cat c ON c.id=v.c LEFT JOIN phpgw_fud_msg m ON m.id=f.last_post_id LEFT JOIN phpgw_fud_forum_read fr ON fr.forum_id=f.id AND fr.user_id=4 ORDER BY v.id
Server Version: 5.0.19
[Referring Page] http://sviatos.lootsma.info/fudforum/3814588639/index.php?
I checked it in mysql console, the quiery only work when I remove the CASE WHEN part. So all field names are correct.
Is this just an MySql 5 error? How can I repair this.
Thanks in advance
|
|
|
Re: Updated MySql 4->5 [message #31136 is a reply to message #31124] |
Tue, 04 April 2006 13:43 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Try to put the
CASE WHEN 0 < m.post_stamp AND (fr.last_view IS NULL OR m.post_stamp > fr.last_view) THEN 1 ELSE 0 END
block in braces and see if that fixes the error.
FUDforum Core Developer
|
|
|
|
Re: Updated MySql 4->5 [message #31149 is a reply to message #31124] |
Tue, 04 April 2006 23:40 |
marten
Messages: 5 Registered: April 2006
Karma: 0
|
Junior Member |
|
|
Ok, that wasn't so big deal in the end.
The value 'reads' is never used, so I just renamed it to 'reads_', even I don't know if it should be there at all.
For the record, the code gave problem on two locations. Both in the theme->default directory. Changed files:
thread.php
msg.php
After I just renamed reads to reads_ everything just works fine.
Thanks
|
|
|