Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    7

    Unanswered: using parenthesis

    This must be so simple to you guys, but I have to ask it.

    I want to select data base on several criteria. I am using Cold Fusion, but the SQL should be the same, so I am asking it here.

    My query looks like this:

    <!-- check to see if both bandname AND emailaddress is present BUT NOT verified -->
    <cfquery name="bandname_and_emailaddress_present_NOT_VERIFI ED" datasource="lmd" dbtype="ODBC">

    SELECT bandid, bandname,password1, emailaddress FROM band WHERE (emailaddress = '#form.emailaddress#') AND (bandname = '#form.bandname#') and (verified = '')


    </cfquery>

    So, firstly, how can I select all records that have the form.emailaddress and form.bandname and verified has no data in it.

    (Verified is a column that gets a 'y' when someone responds to an email and enters the correct password.

    Just so I understand this topic, can someone explain the basics of using parenthesis. Thanking you in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    7

    Re: using parenthesis

    I figured out the answer.

    SELECT bandid, bandname,password1, emailaddress FROM band WHERE emailaddress = '#form.emailaddress#' AND bandname = '#form.bandname#' and verified is null

    Please ignore my question and help other lost souls.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •