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