开发者

Can't find error in stored procedure

开发者 https://www.devze.com 2023-03-02 23:09 出处:网络
I can\'t fint the error in this code? Preciate some help! I also wonder how put values into this stored procedure from PHP/SQL

I can't fint the error in this code? Preciate some help! I also wonder how put values into this stored procedure from PHP/SQL


"
-- SP create new article
DROP PROCEDURE IF EXISTS {$spCreateArticle};

DELIMITER //
CREATE PROCEDURE {$spCreateArticle}
(
IN articleUserId INT,
IN articleSubject CHAR(50),
IN articleText TEXT,
)
BEGIN
INSERT INTO {$tableArticle}
(articleUserId, articleSubject, articleText, articleDate)
VALUES
(spArticleUserId, spArticleSubject, spArticleText, NOW());

END //
DELIMITER ;
",

Error messag开发者_开发百科e: Error code 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 'DELIMITER // CREATE PROCEDURE PCreateArticle ( IN articleUserId INT, IN arti' at line 4)


Should IN articleUserId INT etc. instead be IN spArticleUserId INT etc?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号