Have you tried using parentheses around your last line?
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
-----Original Message-----
From: molemenacer [mailto:rossfarley@stripped]
Sent: Thursday, September 21, 2006 10:29 AM
To: mysql@stripped
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 like '%' and
jobs.custcode like '%' and
jobs.deptcode like '%' and
jobs.specialitycode like '%' and
ifnull(jobs.prevworkerid,'') like '%' and
jobs.jobid like '%' and
jobs.supplierid like '%' and
Approveddate between '2006-09-14' and '2006-09-21' or Approveddate
Is Null
This retrurns all jobs 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.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1