无法使用别名找到在LEFT联接上声明的表。这是我的疑问:
"INSERT INTO currentweekvalue (symbol,value)
SELECT * FROM(SELECT cwv.symbol AS csymbol, (cwv.value + di.value) AS totval
FROM currentweekvalue AS cwv
LEFT JOIN $dayiterated AS di
ON cwv.symbol = di.symbol) cmbtbl
WHERE cmbtbl.csymbol = cmbtbl.di.symbol
ON DUPLICATE KEY UPDATE value = VALUES(cmbtbl.totval)";
我遇到过未知栏&cmbtbl.di.symbol'在' where子句'。如何解决这个问题呢。感谢