我查到这样获取:
mysql_query("call P__Test_Login(@Message, @Id, '{$userId}', '{$pwd}')", $conn) or die("Query failed:".mysql_error());
$result_mess = mysql_query("select @Message");
$result_uid = mysql_query("select @Id");
$row_mess = mysql_fetch_row($result_mess);
$row_uid = mysql_fetch_row($result_uid);
$Proc_Error = $row_mess[0];
$uId = $row_uid[0];
但这样子下面执行存储过程之后又连续使用了
$result_mess = mysql_query("select @Message");
$result_uid = mysql_query("select @Id");
这样等于是不是又向数据库连续发了两次请求,这样压力也太大了额。
我想发一次请求,把输出参数就获取到,就没办法吗?
select @Id as id, @Message as message;