PHPmyAdmin继续拒绝我的SQL认为它有权利,实际上不需要它管理、单项工作,而且只是必须交出,这给我带来好处。
我发现的实际错误是
#1064 - 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 END at line 23
我试图在增加和删除方面玩 playing;对利比里亚国家警察和埃塞俄比亚难民局来说,如果我是 st?
CREATE PROCEDURE topFive(
IN PID VARCHAR(6),
IN CID VARCHAR(6)
)
BEGIN
SELECT `OrderItem`.`ProductID` , COUNT(*) AS `Popularity`
FROM `OrderItem`,
(
SELECT `Order`.`OrderID`
FROM `OrderItem`,`Order`
WHERE
(`Order`.`OrderID`=`OrderItem`.`OrderID`)
AND
(`OrderItem`.`ProductID`=PID)
AND
(`Order`.`CustomerID`!=CID)
) AS `ORDER_ID_TABLE`
WHERE (`OrderItem`.`OrderID` = `ORDER_ID_TABLE`.`OrderID`)
GROUP BY `OrderItem`.`ProductID`
ORDER BY `Popularity`
LIMIT 0,5
END
页: 1