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

Home » General » FUDforum in eGroupWare » SQL syntax error when trying to enter forums
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: SQL syntax error when trying to enter forums [message #29403 is a reply to message #29400] Sun, 18 December 2005 14:23 Go to previous messageGo to previous message
sommer is currently offline  sommer   Denmark
Messages: 21
Registered: December 2005
Location: Denmark
Karma:
Junior Member
Ilia wrote on Sun, 18 December 2005 15:13

I ment like this:
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=2 ORDER BY v.id


Oh - I see...


In that case I get this error-message:
Error

SQL query: Documentation

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 =2
ORDER BY v.id
LIMIT 0 , 30

MySQL said: Documentation
#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 IN' at line 1



Very curious to see what you think about that.

/Henrik
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error 404 in eGroupware
Next Topic: Migrating issues
Goto Forum:
  

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

Current Time: Sun Nov 24 15:10:09 GMT 2024

Total time taken to generate the page: 0.04401 seconds