Left join error with 3 tables

Hi,

Can anyone tell me what’s wrong with this query:

SELECT videos.id AS vidid, videos.name AS vidname, url, date, videocat.name AS catname, filename, spectacle.name AS showname
FROM videos, videocat, spectacle
LEFT JOIN videoimage ON videos.imageid=videoimage.id
WHERE videos.id='$id'
AND videos.category=videocat.id
AND spectacle.id=videos.spectacle

I get the following error:

#1054 - Unknown column 'videos.imageid' in 'on clause'

Thanks
Richard.

Yes, get rid of your comma join syntax


SELECT videos.id      AS vidid,
       videos.name    AS vidname,
       url,
       DATE,
       videocat.name  AS catname,
       filename,
       spectacle.name AS showname
FROM   
        videos
INNER JOIN
       videocat
ON
       videos.category = videocat.id
INNER JOIN
       spectacle
ON
       spectacle.id = videos.spectacle
LEFT JOIN 
       videoimage     
ON 
       videos.imageid = videoimage.id
WHERE  
       videos.id = '$id'

sorry for the delayed reply that did the trick.

Thanks very much