Error using NOT in query...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pplers
    New Member
    • Apr 2007
    • 60

    #1

    Error using NOT in query...

    I have a little bit of a problem in a mysql query. It is this one:

    [CODE=mysql]SELECT `id` FROM `table` WHERE `row1'`='someth ing' AND `row2` NOT NULL;[/CODE]

    How can i select values that verify `row1'`='someth ing' but are not NULL ?

    I tried ! , != and others but with no luck
    Last edited by mwasif; Aug 27 '07, 06:02 PM. Reason: Edited CODE tags to add MySQL tags.
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Use IS NOT NULL
    [CODE=mysql]SELECT `id` FROM `table` WHERE `row1`='somethi ng' AND `row2` IS NOT NULL;[/CODE]

    Comment

    • pplers
      New Member
      • Apr 2007
      • 60

      #3
      thank you..

      and sorry for that lame question

      Comment

      • mwasif
        Recognized Expert Contributor
        • Jul 2006
        • 802

        #4
        No problem, post back whenever you need help.

        Comment

        Working...