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.
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.
Have you got sufficient privileges on the account you are connecting from PHP with? From the manual
As of MySQL 5.0.3, to execute the CREATE PROCEDURE or CREATE FUNCTION statement, it is necessary to have the CREATE ROUTINE privilege
See also Stored Routines and MySQL Privileges in the manual.
As long as:
Then it should be working. Check these and get back to us.
The MySQL manual has a clear overview about how to create stored procedures.
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