Mysql 5.0.12 [message #31886] |
Mon, 22 May 2006 14:42 |
mocara
Messages: 157 Registered: January 2004
Karma: 0
|
Senior Member |
|
|
Hi,
I've found that some apps I have stop working on mysql > 5.0.12 when multiple tables are after the FROM as in
FROM $sql_tbl[variants], $sql_tbl[pricing]
these need to be converted to
FROM ($sql_tbl[variants], $sql_tbl[pricing])
Are there any such problems with FUDForum and mysql > 5.0.12
|
|
|
|
Re: Mysql 5.0.12 [message #31906 is a reply to message #31899] |
Tue, 23 May 2006 20:46 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
FUDforum does not use this syntax for joins, it uses and expliciting INNER JOIN or a LEFT JOIN syntax.
FUDforum Core Developer
|
|
|
Re: Mysql 5.0.12 [message #31915 is a reply to message #31906] |
Wed, 24 May 2006 00:11 |
mocara
Messages: 157 Registered: January 2004
Karma: 0
|
Senior Member |
|
|
That is strange because it was complaining when I upgraded to Mysql 5. I shall do it again and take carefull notes on the errors.
Error example:
064: 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 fud26_fc_view v INNER JOIN fud26_forum f ON f.id=v.f INNER J' at line 1
Query: SELECT f.id, f.name, c.name, c.id, CASE WHEN 1080519799 < m.post_stamp AND (fr.last_view IS NULL OR m.post_stamp > fr.last_view) THEN 1 ELSE 0 END AS reads FROM fud26_fc_view v INNER JOIN fud26_forum f ON f.id=v.f INNER JOIN fud26_cat c ON c.id=v.c LEFT JOIN fud26_msg m ON m.id=f.last_post_id LEFT JOIN fud26_mod mm ON mm.user_id=14181 AND mm.forum_id=f.id INNER JOIN fud26_group_cache g1 ON g1.resource_id=f.id AND g1.user_id=2147483647 LEFT JOIN fud26_group_cache g2 ON g2.resource_id=f.id AND g2.user_id=14181 LEFT JOIN fud26_forum_read fr ON fr.forum_id=f.id AND fr.user_id=14181 WHERE mm.id IS NOT NULL OR ((CASE WHEN g2.id IS NULL THEN g1.group_cache_opt ELSE g2.group_cache_opt END) & 1) > 0 ORDER BY v.id
Is this a case of my dump and import not working?
Mocara.
[Updated on: Wed, 24 May 2006 00:16] Report message to a moderator
|
|
|
Re: Mysql 5.0.12 [message #31933 is a reply to message #31915] |
Wed, 24 May 2006 22:21 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Does the query work if you put
CASE WHEN 1080519799 < m.post_stamp AND (fr.last_view IS NULL OR m.post_stamp > fr.last_view) THEN 1 ELSE 0 EN
in braces?
FUDforum Core Developer
|
|
|