I use mysqli's process-oriented method to create stored procedures
<?php
$con = mysqli_connect('localhost', 'root', 'password', 'test');
if(mysqli_connect_errno($con)){
return mysqli_connect_error;
}
$sql = "
CREATE PROCEDURE pro1(IN title varchar)
BEGIN
DELETE FROM user WHERE username=title;
END;
";
mysqli_query($con, $sql);
mysqli_close($con);
The stored procedure has not been created. What's going on?
I copied the sql statement into phpmyadmin and everything was fine·
Type out the errors and see