ohdang888 Posted July 5, 2008 Share Posted July 5, 2008 $mb = mysql_query("SELECT * FROM `message_board`,`message_read` WHERE message_board.per_code='$rep_p' AND (message_board.state='$rep_state' OR message_board.state='ALL') AND ( if(message_read.u_id ='$user')!= `message_read.m_id` != `message_board.id`) ")or die(mysql_error()); this part is my trouble... AND ( if(message_read.u_id ='$user')!= `message_read.m_id` != `message_board.id`) ")or die(mysql_error()); the way the message board is set up, is that once a user reads it, they click "mark as read" and message_read gets a new row of the user id and the message id... so if they have marked it as read, do not display... thats what i want to acheive here AND ( if(message_read.u_id ='$user') then `message_read.m_id` != `message_board.id`) ")or die(mysql_error()); if there is a row insert with their user id, then the message is cannot equal the messsage id that they qualify for, up until that little piece of the code... Thanks. Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted July 6, 2008 Author Share Posted July 6, 2008 rump de bump Quote Link to comment Share on other sites More sharing options...
fenway Posted July 6, 2008 Share Posted July 6, 2008 Explain that again... Quote Link to comment 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.