View Single Post
09-22-2012, 12:12 AM
#12
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old

Okay. Another JOIN question. This time I'm trying to add two left JOINS to the same query.

Any reason why this isn't working?

PHP Code:
SELECT topics.id idtopics.themetopics.titletopics.revisedtopics.lockedtopics.dateusers.usernameusers.imageusers.rolethemes.id themeidthemes.name

FROM 
`forum topicstopics LEFT JOIN users ON users.id topics.author

LEFT JOIN themes ON themes
.id topics.theme

WHERE slug 
'{$slug}' ORDER BY topics.id LIMIT 1 
If I remove the second LEFT JOIN line and ", themes.id themeid, themes.name" the query works fine.

Reply With Quote