Hi, I can't see how i can get this to work. $select = "SELECT * FROM loads WHERE deliverydate > DATE_ADD(NOW(),INTERVAL -120 HOUR)+0 AND urgency = 'urgent' OR urgency = 'N/A' ORDER BY 'loadready'"; Code (markup): It won't display anything that equals N/A just urgent. Cheers, Adam
1.) What's with the "+0" after your DATE_ADD? 2.) Put parenthesis around "urgency = 'urgent' OR urgency = 'N/A'". Anytime you have AND's and OR's all in a SQL statement, be careful about what your OR is comparing.
It probably wont solve the issue but instead of using urgency = 'urgent' OR urgency = 'N/A' Code (markup): you could use urgency IN ('urgent','N/A') Code (markup): You may get a better response in the database forum Brew