Hello and thank you for reading. I wrote the following code to pull results from a Stored Procedure in MSSQL. The script connects and binds just fine but produces no results and no errors. Running the same Stored Procedure from MSSQL Mangement Console produces well over 4K results passing the same information to the Stored Proc. Any assistance you could provide would be greatly appreciated.
[php]
<?php $conn= mssql_connect ('Server', 'User','Pass'); if (!$conn) { die('Something went wrong while connecting to MSSQL'); } mssql_select_db('Reports', $conn) or die("Couldn't select database"); /* prepare the statement resource */ $stmt=mssql_init("Reports..rptDailySite", $conn); $date = '2012-04-24'; $site = 'AWO'; /* now bind the parameters to it */ mssql_bind($stmt, "@Date", $date, SQLINT4, FALSE); mssql_bind($stmt, "@SiteID", $site, SQLVARCHAR, FALSE); // now execute the procedure $result = mssql_execute($stmt); // get the row that is returned $row = mssql_fetch_assoc($result); // get my value out $headache = $row['AddressLine1']; echo (''.$headache.''); ?>[/php]