MYSQL5 Create a detailed instance of a stored procedure
Login with MySQL tutorial client
2 Selecting a Database tutorial
Mysql>use Test
3 What stored procedures are queried for the current database
Mysql>show procedure status where db= ' test '
4 Create a simple stored procedure
Mysql>create Procedure hi () select ' Hello ';
5 stored procedure created, see How to call it
Mysql>call hi ();
Show Results mysql> call Hi ();
+-------+
| Hello |
+-------+
| Hello |
+-------+
1 row in Set (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
61 Simple storage process is successful, this is just a demo, stored procedures can execute multiple SQL statements at a time, so the PHP tutorial only connected to the database to query multiple statements at once, but to return multiple result sets must use MYSQLI extension to query, or will be prompted error can ' t return a Result set in the given context