actually I would start by saying: SELECT * FROM users WHERE ([Gender] = 'Female') AND ([GenderInterests] LIKE '%x%' OR [GenderInterests] LIKE '%1%' OR [GenderInterests] LIKE '%2%' OR [GenderInterests] LIKE '%3%') AND ([age] BETWEEN '18' AND '45') AND ([country] = 'US') AND ([state] = 'MD') ORDER BY MembershipType, username
On 12/19/05, Mike Appenzellar <[EMAIL PROTECTED]> wrote: > > I think you have to look at how things are grouped...you may need to add > some ()'s here and there. > > On 12/19/05, Mike Belcher <[EMAIL PROTECTED]> > wrote: > > > > strSQLstring = SELECT * FROM users WHERE [Gender] = 'Female' AND > > [GenderInterests] LIKE '%x%' OR [GenderInterests] LIKE '%1%' OR > > [GenderInterests] LIKE '%2%' OR [GenderInterests] LIKE '%3%' AND ([age] > > BETWEEN '18' AND '45') And [country] = 'US' And [state] = 'MD' ORDER BY > > MembershipType, username > > > > > > > > The above string is returning more than it should. It must be in the > > genderinterest part. What I was trying to do when I searched and this > > string > > was built was to > > > > > > Find a Female > > > > Interested in the interests that I clicked such as MALE , FEMALE and > > couple. > > > > > > THE PROBLEM: > > It is supposed to just select from the FEMALES the ones that have > > interests > > in Males or females or couples.......... > > > > IT is bringing up ANYONE - male or female or couples that is interested > > in > > any of the interests. > > > > What can I do I figured that WHERE [Gender] = 'Female' would > > automatically > > eliminate the other genders? > > > > I am thinking it's the way the string has the genderinterests > > organized..... > > it should first grab them only if there female and of those select the > > ones > > that have these genderinterests......... But its selecting anyone that > > has > > these interests regardless of the state or country or gender......... > > HELP. > > > > > > > > > > > > > > SPONSORED LINKS > > Basic programming > > language<http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=bnac3LCZpttb3c9FvbVU-A> > > Computer > > programming > > languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=1Czd2hKCO9_u4KVZQperFQ> > > Programming > > languages<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=TyHGCjod4YOKITrSq1xccQ> > > Java > > programming > > language<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=PZAexF9LyXpKb3HDJSlB1g> > > ------------------------------ > > YAHOO! GROUPS LINKS > > > > > > - Visit your group > > "AspNetAnyQuestionIsOk<http://groups.yahoo.com/group/AspNetAnyQuestionIsOk>" > > on the web. > > > > - To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED]<[EMAIL PROTECTED]> > > > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of > > Service <http://docs.yahoo.com/info/terms/>. > > > > > > ------------------------------ > > > > [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
