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! 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.. 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(). 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
Archived
This topic is now archived and is closed to further replies.