0 Replies Latest reply: Jan 24, 2013 8:43 PM by 904911 RSS

    How to use 'OR' to instead of 'AND' in the backend sql

    904911
      Hi all:

      There are some blanks on a search home page, it will compose a sql sentence while I filling in the blanks and click on search button, such as, select **** from table where A1 = '' AND A2 = '' AND A3 ='' AND A4 = ''. (A1 - A4 represent the blanks on page.)
      But now, I want the sql be the below format:
      select **** from table where A1 = '' AND A2 = '' AND (A3 ='' OR A4 = '').



      How to achieve that success?

      Thanks in advance.