0
MySQL查询:MYSQL连接错误。如何解决?
SELECT * FROM `pet_info` LEFT JOIN `lostpets` ON `pet_info`.`id` = `lostpets`.`petid` LEFT JOIN `pet_images` ON `pet_info`.`id` = `pet_images`.`petid` LEFT JOIN ON `pet_info`.`pet_cat` CASE WHEN `pet_info`.`pet_cat` = 1 THEN `dog_breeds`.`id` WHEN `pet_info`.`pet_cat` = 2 THEN `cat_breeds`.`id` END WHERE `pet_info`.`pet_user_id` = 581
错误:
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 'ON `pet_info`.`pet_cat` CASE WHEN `pet_info`.`pet_cat` = 1 THEN `do' at line 7
为什么错误出现,请帮助我。 Gow可以解决这个错误吗?
'LEFT JOIN ON'。 - 一些基本的格式可能会有所帮助。 – Strawberry
你能帮我写答案吗? –
不是。错误太多了。 – Strawberry