Re: [PHP-DB] 'OR' logic in mySQL query

2005-04-17 Thread Mark Cain
You might want to pattern you SELECT statement in this manner: SELECT * FROM `tablename` WHERE status = 3 OR status = 1 Notice I called the field name explicitly on each side of the OR. Be sure to check the data type for the date field -- if it is a datetime stamp or date stamp, it might

Re: [PHP-DB] 'OR' logic in mySQL query

2005-04-17 Thread Miles Thompson
No - OR and AND tests work like this: (first conditional test) OR (second conditional test) therefore ((date_received LIKE '$todays_date) OR (date_received LIKE '$yesterdays_date')) And of course you will check the MySQL docs to confirm that OR does work in the WHERE clause, won't you?