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
    Location
    Trappe, MD
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    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 05:40. Reason: add to description


Bookmarks

Posting Permissions

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