laravel 怎么调用mysql存储过程
加粗文字lumen怎么访问存储过程,用$result=DB::select("CALL sc_p_getuser(?,?,?,?,?)",[$fopenid,$fnickname,$fsex,$fcity,$ret]);方式,是可以访问到存储过程,数据会写入,但是会返还,链接已经定向错误
$result=DB::statement("CALL sc_p_getuser(?,?,?,?,?)",[$fopenid,$fnickname,$fsex,$fcity,$ret]);
这种方式,则返还ueryException in Connection.php line 729:
Illuminate\Database\Connection::Illuminate\Database{closure}(): Premature end of data (mysqlnd_wireprotocol.c:1116) (SQL: CALL sc_p_getuser(10,1,1,杭州,1))错误,请问怎么解决呢
$result=DB::statement("CALL sc_p_getuser(?,?,?,?,?)",[$fopenid,$fnickname,$fsex,$fcity,$ret]);
这种方式,则返还ueryException in Connection.php line 729:
Illuminate\Database\Connection::Illuminate\Database{closure}(): Premature end of data (mysqlnd_wireprotocol.c:1116) (SQL: CALL sc_p_getuser(10,1,1,杭州,1))错误,请问怎么解决呢
0 个回复