从存储过程获取输出参数到PHP

时间:2022-05-30 21:40:06

Hello so far this is end of my sql based knowledge, i am seeking some help. As you can see this is my stored procedure. I only want get that TestPkId to php.从存储过程获取输出参数到PHP and this is php which is sending some data where produced on my html it send data to database which is procedure use.

你好到目前为止这是我的基于SQL的知识的结束,我正在寻求一些帮助。如您所见,这是我的存储过程。我只想把那个TestPkId带到php。这是php发送一些数据,在我的html上生成它将数据发送到数据库,这是程序使用。

$PersonName=$_GET['PersonName'];
$TestXML=$_GET['TestXML'];
$TestDate=$_GET['TestDate'];
include('DBConnect.php');
    $proc = "{call p_set_Test(?,?,?,?,?,?,?,?)}";   
    $params = array($TestDate,0,$PersonName,$TestXML,'',101,10,0);   
    $result = sqlsrv_query( $conn, $proc, $params);
// how to get testpkid into php parametr in this php?

if it isn't understandable i will try to explain more thank you

如果不可理解我会尝试解释更多谢谢

1 个解决方案

#1


0  

$PersonName=$_GET['PersonName'];
$TestXML=$_GET['TestXML'];
$TestDate=$_GET['TestDate'];
include('DBConnect.php');
    $proc = "{call p_set_Test(?,?,?,?,?,?,?,?)}";   
    $params = array($TestDate,0,$PersonName,$TestXML,'',101,10,0);   
    $result = sqlsrv_query( $conn, $proc, $params);

i get all variable from this php and put it to html simple and answered

我从这个PHP得到所有变量,并将其简单地放到html并回答

#1


0  

$PersonName=$_GET['PersonName'];
$TestXML=$_GET['TestXML'];
$TestDate=$_GET['TestDate'];
include('DBConnect.php');
    $proc = "{call p_set_Test(?,?,?,?,?,?,?,?)}";   
    $params = array($TestDate,0,$PersonName,$TestXML,'',101,10,0);   
    $result = sqlsrv_query( $conn, $proc, $params);

i get all variable from this php and put it to html simple and answered

我从这个PHP得到所有变量,并将其简单地放到html并回答