Help!!.... what's wrong with the below?? I am getting a SQL syntax error number 1064 for line indicated by arrow.
CREATE PROCEDURE SP_IsProductInBasket (
IN customerId INT(11),
IN productId TINYTEXT
)
BEGIN
SELECT
products_id
FROM customers_basket
WHERE customers_id = customerId
AND products_id = productId; <------ error here????!!!
END
I've verified the select works fine as a stand alone
try changing the delimiter,
DELIMITER $$
CREATE PROCEDURE SP_IsProductInBasket
(
IN customerId INT(11),
IN productId TINYTEXT
)
BEGIN
SELECT products_id
FROM customers_basket
WHERE customers_id = customerId AND
products_id = productId;
END $$
DELIMITER ;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.