Trying to import stored procedures created in my local machine into a web server (iPage hosting) by using phpMyAdmin.
Due to errors in the process of importing the procedures I decided to manually enter the stored procedures using scripts into the server, like the following example:
CREATE PROCEDURE upvote(IN _message_id int, IN _user_id int)
BEGIN
DECLARE qty_upvotes INT;
INSERT IGNORE INTO upvotes SET message_id = _message_id,user_id = _user_id;
SET qty_upvotes = (SELECT COUNT(*) FROM upvotes WHERE message_id = _message_id);
UPDATE message_stats
SET upvotes = qty_upvotes
WHERE message_id = _message_id;
END
Then I get the error below.
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 '' at line 3
I looked for it everywhere since 2 days now and I cannot find a solution.
Any clue?
Got feedback from my hosting provider about the issue:
Unfortunately 'stored procedures' and 'stored routines' are not supported in our platform. I suggest you to install latest version of phpmyadmin to your account which supports these options.