#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    15
    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
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    15
    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.

Similar Threads

  1. Should I relate tables using joins, or not?
    By lucretius in forum Development Articles
    Replies: 0
    Last Post: November 25th, 2003, 12:37 AM
  2. How do I order by the sequence in my in clause?
    By colpaarm in forum MySQL Help
    Replies: 3
    Last Post: May 22nd, 2003, 09:49 AM
  3. Replies: 1
    Last Post: October 21st, 2002, 02:56 AM
  4. field alias not working in where clause
    By dsafar in forum MySQL Help
    Replies: 4
    Last Post: August 29th, 2002, 02:33 PM
  5. Table joins that use DISTINCT clause
    By mstembri in forum MySQL Help
    Replies: 3
    Last Post: January 7th, 2002, 06:35 PM

IMN logo majestic logo threadwatch logo seochat tools logo