Php 使用存储过程建立MySQL数据库连接

Php 使用存储过程建立MySQL数据库连接,php,mysql,stored-procedures,database-connection,Php,Mysql,Stored Procedures,Database Connection,所有通过PHP使用MySQL存储过程的示例都显示了在调用过程之前与PHP建立连接的脚本。是否可以定义和使用过程来建立连接,并返回PHP使用的连接处理程序?存储过程可以具有IN、INOUT和OUT参数,具体取决于MySQL版本 IN Passes a value into a procedure. OUT Passes a value from a procedure back to the caller. INOUT The caller initializes an INOUT param

所有通过PHP使用MySQL存储过程的示例都显示了在调用过程之前与PHP建立连接的脚本。是否可以定义和使用过程来建立连接,并返回PHP使用的连接处理程序?

存储过程可以具有IN、INOUT和OUT参数,具体取决于MySQL版本

IN
Passes a value into a procedure.

OUT
Passes a value from a procedure back to the caller.

INOUT
The caller initializes an INOUT parameter, but the procedure can modify the value, and the final value is visible to the caller when the procedure returns.
您需要连接到数据库才能调用存储过程。。因此,您无法获得回调连接的过程