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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.