a simple join

Results 1 to 2 of 2

Thread: a simple join

  1. #1
    JOEL M Guest

    Default a simple join

    For some reason I can&#039t get a join to work, it keeps saying:<BR>the field name category could refer to more than one table<BR>even though I&#039ve copied down the syntax exactly [Ithink] from all kinds of help sources....itgoes pretty much like this:<BR>SELECT * FROM items, categories WHERE category LIKE &#039"&query&"&#039 AND items.category = categories.category<BR>any help would be appreciated thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: a simple join

    It&#039s because the field name category could refer to more than one table. You need to specify a table in your WHERE clause e.g.<BR><BR><BR>SELECT * FROM items, categories WHERE categories.category LIKE &#039"&query&"&#039 AND items.category = categories.category<BR><BR>regards, Steve<BR>

Posting Permissions

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