note 98302 modified in function.odbc-result-all by danbrown
| From: | danbrown@php.net | Date: | Tue, 08 Jun 2010 14:31:51 +0000 |
| Subject: | note 98302 modified in function.odbc-result-all by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169942@lists.php.net to get a copy of this message | ||
code for php mssql odbc connection and executing an stored procedure
<?php
$package_code = 'AUS03B';
$client_id = 499;
$conn = odbc_connect(DSN,USER,PASS,SQL_CUR_USE_ODBC);
//SQL_CUR_USE_IF_NEEDED,SQL_CUR_USE_ODBC ,SQL_CUR_USE_DRIVER SQL_CUR_DEFAULT
$sql_result = odbc_prepare($conn, "EXEC usp_packagesearch_xml
'$package_code','$client_id'");
$result = odbc_execute($sql_result);
//$string = odbc_result($sql_result,1);
$string = odbc_result_all($sql_result,"border=1");
?>
--was--
code for php mssql odbc connection and executing an stored procedure
$package_code = 'AUS03B';
$client_id = 499;
$conn = odbc_connect(DSN,USER,PASS,SQL_CUR_USE_ODBC);
//SQL_CUR_USE_IF_NEEDED,SQL_CUR_USE_ODBC ,SQL_CUR_USE_DRIVER SQL_CUR_DEFAULT
$sql_result = odbc_prepare($conn, "EXEC usp_packagesearch_xml
'$package_code','$client_id'");
$result = odbc_execute($sql_result);
//$string = odbc_result($sql_result,1);
$string = odbc_result_all($sql_result,"border=1");
http://php.net/manual/en/function.odbc-result-all.php