爲什麼這個查詢:未知列誤差在WHERE子句
SELECT SQL_CALC_FOUND_ROWS,a.*,(SELECT cy.iso_code
FROM ps_address AS addr, ps_country AS cy
WHERE addr.id_customer=a.id_customer
AND addr.id_country=cy.id_country) iso_code
FROM `ps_customer` a
WHERE iso_code='IT'
ORDER BY a.`id_customer` ASC
LIMIT 0,50
返回我:#1054 - Unknown column 'iso_code' in 'where clause'?
這也是我的第一個建議,但它是'(SELECT ...)iso_code' – WiiMaxx