Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to create a connection from PHP to your SQL Server, preferably using the SQLSRV or PDO extentions. (Wich is basically what SQL Server Manager does for you)</p> <pre><code>$pdo = new PDO(...); $stmt = $pdo-&gt;prepare('exec dbo.getStuff ...'); $res = $stmt-&gt;execute(array($productId, $serialNbr, ...)); return $res; </code></pre> <p>In place of ... you need to provide the arguments required.</p> <p>See:</p> <ul> <li><a href="http://php.net/manual/en/class.pdo.php" rel="nofollow noreferrer">PDO</a></li> <li><a href="http://php.net/manual/en/class.pdostatement.php" rel="nofollow noreferrer">PDOStatement</a></li> </ul> <p>Edit: Found a few examples right here on stackoverflow:</p> <ul> <li><a href="https://stackoverflow.com/questions/5913347/php-pdo-with-sqlserver-stored-procedure-doesnt-return-all-the-data">PHP PDO with SqlServer Stored Procedure doesn't return all the data</a></li> <li><a href="https://stackoverflow.com/questions/9982466/executing-a-stored-procedure-with-pdo-sqlsrv">Executing a Stored Procedure with pdo_sqlsrv</a></li> <li><a href="https://stackoverflow.com/questions/11440499/calling-3-stored-procedures-with-pdo-dblib-in-php-5-4-4-fails">Calling 3 Stored Procedures with PDO DBLIB in PHP 5.4.4 fails</a></li> </ul> <p>Although they also have their problems, they do give a good impression of what is needed to execute stored procedures.</p> <p>Edit2: another few examples using sqlsrv_*:</p> <ul> <li><a href="https://stackoverflow.com/questions/8355577/getting-output-of-ms-stored-proc-on-php-call-sqlsrv">Getting output of MS stored proc on php call</a></li> <li><a href="https://stackoverflow.com/questions/13274261/php-sqlsrv-query-stored-procedure-with-naming-parameters">php sqlsrv_query stored procedure with naming parameters</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload