MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 19th, 2006, 03:55 AM
arprilia arprilia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 1 arprilia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 26 sec
Reputation Power: 0
SELECT syntax LOVE

Need Help!!!

i would like to display records for people that loves 'A' and loves 'B'...
i'm having problem with this syntax...

SELECT * FROM loves WHERE loveID = 'A' AND loveID = 'B'


tried using the syntax below...

SELECT lovesFROM kemahiran
WHERE loveID IN ('A', 'B')

..but it returns anyone who loves 'A' or 'B'....
..instead i wanna display people who love both 'A' & 'B'...

please help....thanx in advance.....

Reply With Quote
  #2  
Old December 24th, 2006, 01:52 AM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 542 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 2 h 49 m 17 sec
Reputation Power: 3
database query

I have a feeling that your problem may not be how to write the right query, but that your table schema isn't adequate for your goals. How does the field "loveID" store the possibly multiple values?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > SELECT syntax LOVE


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway