mysql - Correct Syntax for left join -
can tell me why sql query not execute?
select t_ads.*, t_adpics.picfile, t_ads left join t_adpics on t_ads.adid = t_adpics.adid , t_adpics.isevent = '0' left join t_featured on t_ads.adid = t_featured.adid , t_featured.adtype = 'a' (a.adtitle '%findandpost%' or a.addesc '%findandpost%') , a.enabled = '1' , a.verified = '1' , a.expireson >= now() , a.paid <> '0' , (t_featured.adid null or t_featured.featuredtill < now()) group t_ads.adtitle order rand() limit 0, 50
you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'from t_ads left join t_adpics on t_ads.adid = t_a' @ line 4
the problem statement have comma before from
clause,
select t_ads.*, t_adpics.picfile, ^ remove comma
Comments
Post a Comment