SELECT,a.sales, as pname,a.price,a.market_price,a.member_id as userid,a.pic, FROM ys_product a left join ys_shop c on a.member_id=c.userid WHERE c.shop_statu=1 and a.status>0 and is_shelves=1 and a.brand='Levi's' order by a.rank,a.addtime desc You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's' order by a.rank,a.addtime desc' at line 1