I think the problem is here:

> and (workorders.closedby = personnel.id OR workorders.closedby IS NULL)

There is no way for a personnel record to be selected if the closedby value
is NULL, so no record gets selected. The simplest way to fix this is to add
a 'null' personnel record with personnel.id set to NULL. Then remove the
'OR' phrase, and it should work, the null record being selected from
personnel when closedby is NULL.

Jim


Imagine a service that checks your business email for viruses, junk-mail and 
pornographic content BEFORE it reaches you.
Imagine a service that allows you to build custom rules for content management.
Imagine a service that does all this without having to make a single change to your 
computer system.

EMF Enterprise for businesses is a service that offers all of this

To make your imagination a reality go to www.emf-systems.com

(This email has been scanned for viruses by www.emf-systems.com)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to