August 17, 201115 yr Hey i need a query that searches a column called status for only 'Quote Sent' and 'Item posted' but my current query isn't working: $query = " SELECT * FROM `table` WHERE (`status` = 'Quote Sent' OR `status` = 'Item Posted') ORDER BY `posted` DESC; "; Anyone can help me with this? Thanks, Adam
August 17, 201115 yr $status1 = 'Quote Sent'; $status2 = 'Item Posted'; $qry = "SELECT * FROM `table` WHERE `status`='$status1' OR `status`='$status2' ORDER BY `posted` DESC"; or, just replace the variables in the query with the text, should work as well
Create an account or sign in to comment