MySQL operators

2006-09-21 Thread molemenacer
whether they are status 6 or not, i need to have a comparison on approveddate, it is either between the two dates or null, but is status 6. -- View this message in context: http://www.nabble.com/MySQL-operators-tf2312290.html#a6429307 Sent from the MySQL - General mailing list archive at Nabble.com

Re: MySQL operators

2006-09-21 Thread Johan Höök
Hi, what I see is that you at least will get everything where Approveddate IS NULL. You will have to add on parentheses around (Approveddate between '2006-09-14' and '2006-09-21' or Approveddate Is Null) as AND has precedence over OR. Also if your query always will be against like '%' you should

Re: MySQL operators

2006-09-21 Thread Gerald L. Clark
molemenacer wrote: I have a query that searches on a number of criteria and would like help on the last line I have included my code below: where jobs.statusid in (6) and ifnull(jobs.currworkerid,'') like '%' and jobs.dictatorid like '%' and jobs.custcode like '%' and

RE: MySQL operators

2006-09-21 Thread Jerry Schwartz
10:29 AM To: mysql@lists.mysql.com Subject: MySQL operators I have a query that searches on a number of criteria and would like help on the last line I have included my code below: where jobs.statusid in (6) and ifnull(jobs.currworkerid,'') like '%' and jobs.dictatorid