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

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 29th, 2000, 03:57 PM
mstembri mstembri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Norcross, GA
Posts: 458 mstembri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I'm having trouble with a join query. In this example there are two tables that will be queryed with $pmsid as the common field. That much I have figured out.

I would like to add a clause that will only list data where $compatible = 'y'. I've tried a few things, with this example being the one I thought would surely work:

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>SELECT * FROM ver,pms WHERE ver.pmsid=pms.pmsid AND ver.compatible = 'y' ORDER BY pmsname, ver[/code]

When this query is performed, no results are returned (there should be over 100).

Any help is appreciated.
- Mike

Reply With Quote
  #2  
Old September 30th, 2000, 11:07 AM
mstembri mstembri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Norcross, GA
Posts: 458 mstembri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Resolution:

Changed the ORDER BY clause:

ORDER BY pms.pmsname, ver.ver

No rows were returned because there was not a table association with the ORDER BY fields.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Joins with WHERE clause


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 3 hosted by Hostway
Stay green...Green IT