MySQL LEFT JOIN error

后端 未结 3 1789
暗喜
暗喜 2021-01-22 06:39

I\'ve got some SQL that used to work with an older MySQL version, but after upgrading to a newer MySQL 5 version, I\'m getting an error. Here\'s the SQL:

SELECT          


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-01-22 07:18

    if your projectID column really exists, and there's no typo , try to change this to

    
    SELECT portfolio.*, projects.*, types.*
    FROM projects
    INNER JOIN types ON projects.projectType = types.typeID 
    LEFT JOIN portfolio
    ON portfolio.pfProjectID = projects.projectID
    WHERE  types.typeID = #URL.a#
    ORDER BY types.typeSort, projects.projectPriority ASC
    

提交回复
热议问题