sql=SELECT kf_toretate.*,kf_shop.shop_id as shop_id,kf_shop.shop_name as shop_name,kf_shop.shop_url as shop_url,kf_shop.shop_public as shop_public,pref.area_name as pref_name,area1.area_name as area1_name,area2.area_name as area2_name,area3.area_name as area3_name FROM kf_toretate left join kf_shop on kf_shop.shop_id = kf_toretate.tore_shop_id LEFT JOIN kf_area pref on kf_toretate.tore_pref=pref.area_id LEFT JOIN kf_area area1 on kf_toretate.tore_area1=area1.area_id LEFT JOIN kf_area area2 on kf_toretate.tore_area2=area2.area_id LEFT JOIN kf_area area3 on kf_toretate.tore_area3=area3.area_id WHERE kf_toretate.tore_id = limit 1 Error 1064: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 'limit 1' at line 1: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 'limit 1' at line 1