我用mysqli的面向过程方法创建存储过程
<?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);
存储过程并没有被创建,请问这是怎么回事?
我把sql语句复制到phpmyadmin里面一切正常·