I created several stored procedures in phpmyadmin, how is it possible to call them using an sql query (mysql) ?
Asked
Active
Viewed 1.2k times
3 Answers
4
CALL name_of_stored_procedure(parameters);
Try this on the 'SQL' tab:
CREATE DEFINER=`root`@`localhost` PROCEDURE `storedprocedure1`(OUT myvar1 CHAR(64))
SET myvar1="IT ";
CREATE DEFINER=`root`@`localhost` PROCEDURE `storedprocedure2`(OUT myvar2 CHAR(64))
SET myvar2="WORKS";
Then call:
CALL procedure1(@var1);
CALL procedure2(@var2);
SELECT @var1,@var2;

JoRobles
- 96
- 1
- 6
4
the above example does work except for typo - should be:
CALL storedprocedure1(@var1);
CALL storedprocedure2(@var2);
SELECT @var1,@var2;
just missed the "stored" prefix of the procedure name off the the CALL's

CoolBeans
- 20,654
- 10
- 86
- 101

Andrew Blake
- 147
- 1
- 5
-4
As far as I know phpmyadmin doesn't support this.

Vladimir
- 12,753
- 19
- 62
- 77
-
You can create/edit/execute stored procedures from phpmyadmin. Look [here](http://stackoverflow.com/a/19197966/179669) – Bakudan Oct 05 '13 at 12:47