Hi Soonix,
Thanks for taking the time to review my dilemma.
I originally had the DBIx::Class call the way you have it, at the end of your post.
However, the where clause you created produces:
WHERE ( status = 'Offered OR status = 'Declined' OR status = 'Cancelled' OR status = 'Conditional Offer' ) OR <-- This must be AND ( sent_email IS NOT NULL AND <-- This must be OR sent_email != '0000-00-00' )
You cannot have a query using one column with 2 different values, unless you use an OR,
such as, sent_mail is not null OR sent_email != '0000-00-00'. The other part of the my condition
is the status must be one of the four statuses.
My current DBIx::Class call produces what I actually need:
WHERE ( sent_email IS NOT NULL OR sent_email != '0000-00-00' ) AND ( status = 'Offer' OR status = 'Declined' OR status = 'Cancelled' OR status = 'Conditional Offer' )
This query will return rows of data with a real sent_email date AND one of the four statuses.
FYI, there are more than four statuses, but this part of the condition narrows the list down to these four
statuses.
Thanks again for taking the time to review my dilemma.
-Phil-
In reply to Re^4: Problems Using Join in DBIx::Class
by phildeman
in thread Problems Using Join in DBIx::Class
by phildeman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |