3D-kreativ
3D-kreativ

Reputation: 9299

Can't find error in stored procedure

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 message: 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)

Upvotes: 0

Views: 180

Answers (1)

Hammerite
Hammerite

Reputation: 22340

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

Upvotes: 1

Related Questions