hot to apply "not equal"

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default hot to apply "not equal"

    my query is like that:

    <cfquery name="CheckEmail" datasource="Dating">
    Select Email From MemberMain Where MemberID <> #Session.MemberID#
    </cfquery>


    however the output still come with that record, so what's wrong with me?

    HongKongSunny Guest

  2. Similar Questions and Discussions

    1. Dropdownlist "Select Value Equal To" Gives an Error
      In DW MX 2004 (C#), when I set the "select value equal to" for a dropdownlist item, I get the following .NET error once I try to view the webpage: ...
    2. Added text field to database. New entries not equal to "" ???
      Hi! I'm accessing an MS Access database from an ASP server. I just added a new text column (field) to one of my tables. I have not added any...
    3. Including "less equal" sign in MX under windows
      How can I include special characters like the "less equal" character in a technical FreeHand MX drawing under Windows 2000? - Characters like...
    4. #25763 [Opn->WFx]: Why the string "1.10" is equal to the string "1.1"?
      ID: 25763 Updated by: pollita@php.net Reported By: jparneodo at yahoo dot fr -Status: Open +Status: ...
    5. #25763 [NEW]: Why the string "1.10" is equal to the string "1.1"?
      From: jparneodo at yahoo dot fr Operating system: RH7.2 PHP version: 4.3.3 PHP Bug Type: Strings related Bug description: ...
  3. #2

    Default Re: hot to apply "not equal"

    If #Session.MemberID# = 3 and your table contains:

    MemberID
    1
    2
    3
    4

    Your query should return the emails for MemberID's 1,2 and 4. If this is not correct, what results do you want?
    mxstu Guest

  4. #3

    Default Re: hot to apply "not equal"

    Could be that two records have the same email. To check, do this

    select email, count(email)
    from membermain
    group by email
    having count(email) >1
    Dan Bracuk Guest

  5. #4

    Default Re: hot to apply "not equal"

    mxtsu:

    <cfquery name="CheckEmail" datasource="Dating">
    Select Email From MemberMain Where MemberID <> #Session.MemberID#
    </cfquery>

    what i want is when member update their email , doesn't want duplicate email,
    but if the member doesn't change the email, it also said that the email was
    used, even belongs to the sae person

    HongKongSunny Guest

  6. #5

    Default Re: hot to apply "not equal"

    Then you also need to check the email address:

    Select Email
    From MemberMain
    Where Email = '#form.newEmailAddress#' AND
    MemberID <> #Session.MemberID#
    mxstu Guest

  7. #6

    Default Re: hot to apply "not equal"

    mxtsu,
    thanks i think i didn't use "And"
    HongKongSunny Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139