www.webdeveloper.com
Results 1 to 5 of 5

Thread: Simple query advise

  1. #1
    Join Date
    Mar 2006
    Posts
    413

    Simple query advise

    i have the following query:

    Code:
    Select tblSearch.intSuccess From tblSearch Where tblSearch.website = 'TEST' OR tblSearch.website = 'RR TEST' OR tblSearch.website = '' And tblSearch.intSuccess = 0
    the problem is that is returns the results and ignores the intSuccess = 0.
    it returns the value whatever it is.

    Whats wrong with the query? thanks guys

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    you need to put parenthesis around the logic you want it to show.

    I think you want it like this:

    [code]
    Select tblSearch.intSuccess From tblSearch Where (tblSearch.website = 'TEST' OR tblSearch.website = 'RR TEST' OR tblSearch.website = '') And tblSearch.intSuccess = 0

  3. #3
    Join Date
    May 2004
    Location
    chennai, tamil nadu, India
    Posts
    450
    Select tblSearch.intSuccess From tblSearch Where (tblSearch.website = 'TEST' OR tblSearch.website = 'RR TEST' OR tblSearch.website = '') And tblSearch.intSuccess = 0

    Might solve the problem

  4. #4
    Join Date
    May 2004
    Location
    chennai, tamil nadu, India
    Posts
    450

    Just 1min difference !

    Wow Chazzy beat me to it by 1 min !

  5. #5
    Join Date
    Mar 2006
    Posts
    413
    thanks guys, worked a treat

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles