davej Posted May 11, 2014 Share Posted May 11, 2014 Maybe... "SELECT conversations.conversation_id, conversations.conversation_subject, MAX(conversation_messages.message_date) AS conversation_last_reply, MAX(conversation_messages.message_date) > conversation_members.conversations_last_view AS conversation_undread FROM conversations LEFT JOIN conversation_messages ON conversations.conversation_id = conversation_messages.conversation_id INNER JOIN conversation_members ON conversations.conversation_id = conversation_members.conversation_id WHERE conversation_members.user_id = 1 AND conversation_members.conversation_deleted = 0 GROUP BY conversations.conversation_id ORDER BY conversation_last_reply DESC;"; Link to comment Share on other sites More sharing options...
etsted Posted May 11, 2014 Author Share Posted May 11, 2014 did you even apply any changes? Link to comment Share on other sites More sharing options...
davej Posted May 11, 2014 Share Posted May 11, 2014 No, I just removed your single quotes. Have you tested simpler versions of your query? Did the simpler versions work? I tried this... http://www.piliapp.com/mysql-syntax-check/ ...and it did not like all your single quotes. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 12, 2014 Share Posted May 12, 2014 It sounds like your query is returning more data than the memory limit for the script. You can increase the memory limit if necessary. You also check how many rows that query is returning. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now