note 110950 added to function.sqlsrv-prepare
| From: | Anonymous | Date: | Fri, 28 Dec 2012 16:21:08 +0000 |
| Subject: | note 110950 added to function.sqlsrv-prepare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192695@lists.php.net to get a copy of this message | ||
Its words :
Stored Procedure with input param on PHP Version => 5.4.6; (For windows Xp -> Download
Unofficial Microsoft SQL Server Driver for PHP (sqlsrv) http://robsphp.blogspot.co.uk/2012/06/unofficial-microsoft-sql-server-driver.html)
and download Microsoft Visual C++ 2010 x86 Redistributable Setup
$sql = new PDO( "sqlsrv:server=$server;Database = $database", $user, $password);
$query = "{? = CALL sp_Login(?, ?)}";
$stmt = $sql->prepare( $query );
$returnVariable = 0;
$inputVariable1 = 'input1';
$inputVariable2 = 'input2';
$stmt->bindParam(1,$returnVariable,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,100);
$stmt->bindParam(2,$inputVariable1,PDO::PARAM_STR);
$stmt->bindParam(3,$inputVariable2,PDO::PARAM_STR);
$stmt->execute();
echo "Return value: ".$returnVariable;
----
Server IP: 195.54.192.44
Probable Submitter: 92.112.133.174
----
Manual Page -- http://php.net/manual/en/function.sqlsrv-prepare.php
Edit -- https://master.php.net/note/edit/110950
Del: integrated -- https://master.php.net/note/delete/110950/integrated
Del: useless -- https://master.php.net/note/delete/110950/useless
Del: bad code -- https://master.php.net/note/delete/110950/bad+code
Del: spam -- https://master.php.net/note/delete/110950/spam
Del: non-english -- https://master.php.net/note/delete/110950/non-english
Del: in docs -- https://master.php.net/note/delete/110950/in+docs
Del: other reasons-- https://master.php.net/note/delete/110950
Reject -- https://master.php.net/note/reject/110950
Search -- https://master.php.net/manage/user-notes.php