I would like to create a stored procedure in PHP MySQL via PHPMyAdmin. When I put this on as a SQL command:
CREATE PROCEDURE getBanks()
BEGIN
select * from cp_banks; END
I receive the following error:
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unknown Punctuation String @ 1 STR: // SQL: // CREATE PROCEDURE getBanks() BEGIN select * from cp_banks;// CREATE PROCEDURE getBanks() BEGIN select * from cp_banks;// CREATE PROCEDURE getBanks() BEGIN select * from cp_banks;
MySQL said:
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 '//
CREATE PROCEDURE getBanks() BEGIN select * from cp_banks' at line 1
Please tell me where the error comes from.