SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: JOin problem

Threaded View

  1. #1
    SitePoint Zealot willoworks's Avatar
    Join Date
    May 2003
    Trappe, MD
    0 Post(s)
    0 Thread(s)

    JOin problem

    I have been messing with this simple problem too long.
    This code:

    $query = mysql_query("SELECT * FROM boats, dealers
    INNER JOIN dealers ON boats.code = dealers.code

    WHERE make LIKE '%$make%' AND size LIKE '%$size%'");

    always fails when I add the join in. The two tables are boats and dealers, both have the field code which is the dealer code and the field I am trying to join on. I only want to pull the dealer name out of the database for each listing, it shouldn't be that hard~

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/boatdi2/public_html/listings/search2.php on line 55
    Last edited by willoworks; Dec 29, 2004 at 06:40. Reason: add to description


Posting Permissions

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