DanDaBeginner Posted February 26, 2007 Share Posted February 26, 2007 what is the problem with my query? even if the del_id = 1 it display.. if you can see "del_id <> 1" a row that has a del_id =1 should not be display but when I run myscript it still displaying..I already tried del_id != 1 but still the same error occured.. Any help is greatly appreciated.. $query_chk_msg = mysql_query("SELECT del_id,message_content FROM table_message WHERE (sender_id = 3 AND recepient_id = 1) OR (sender_id =1 AND recepient_id = 3) AND del_id <> 1 "); Link to comment https://forums.phpfreaks.com/topic/40162-help-with-my-query-thanx-in-advance/ Share on other sites More sharing options...
Orio Posted February 26, 2007 Share Posted February 26, 2007 Try putting the two "OR"s in between parentheses: $query_chk_msg = mysql_query("SELECT del_id,message_content FROM table_message WHERE ((sender_id = 3 AND recepient_id = 1) OR (sender_id =1 AND recepient_id = 3)) AND del_id <> 1 "); Orio. Link to comment https://forums.phpfreaks.com/topic/40162-help-with-my-query-thanx-in-advance/#findComment-194315 Share on other sites More sharing options...
DanDaBeginner Posted February 26, 2007 Author Share Posted February 26, 2007 thanx...Orio Link to comment https://forums.phpfreaks.com/topic/40162-help-with-my-query-thanx-in-advance/#findComment-194319 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.