Kim Kim - 2 months ago 14
MySQL Question

How to create a MySQL stored procedure from PHP?

My attempts to query MySQL from PHP with a create statement of a store procedure (SP) have all failed. Is this not possible ?

If indeed possible, please give an example.

Answer

The MySQL manual has a clear overview about how to create stored procedures (13.1.15. CREATE PROCEDURE and CREATE FUNCTION Syntax).

The next question is: does the account you use to access the MySQL database the propper rights to actually create a procedure?

Details about this question can be found here: 19.2.2. Stored Routines and MySQL Privileges

Comments