kindtiger Posted July 1, 2010 Share Posted July 1, 2010 $sql = "SELCET MAX( messages.date ) AS maxdate, topics.id AS topicid, topics.*, users.* FROM messages, topics, users WHERE messages.topic_id = topics.id AND topics.user_id = users.id AND topics.forum_id = 1 GROUP BY messages.topic_id ORDER BY maxdate DESC;"; $result = mysql_query($sql); but the $result is FALSE what's wrong with the select statement? Thank you in advance! Quote Link to comment https://forums.phpfreaks.com/topic/206346-whats-wrong-with-querry-statement/ Share on other sites More sharing options...
smonkcaptain Posted July 1, 2010 Share Posted July 1, 2010 'SELECT' is spelt wrong.. Quote Link to comment https://forums.phpfreaks.com/topic/206346-whats-wrong-with-querry-statement/#findComment-1079587 Share on other sites More sharing options...
fenway Posted July 1, 2010 Share Posted July 1, 2010 And next time, use mysql_error(). Quote Link to comment https://forums.phpfreaks.com/topic/206346-whats-wrong-with-querry-statement/#findComment-1079758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.