PHP 4.0 Bug #5083: odbc_do & odbc_exec cause a general error.
| From: | bill_hardeman at adventure dot com | Date: | Fri, 16 Jun 2000 14:30:26 +0000 |
| Subject: | PHP 4.0 Bug #5083: odbc_do & odbc_exec cause a general error. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21521@lists.php.net to get a copy of this message | ||
From: bill_hardeman@adventure.com
Operating system: Debian Linux 2.2.14
PHP version: 4.0.0 Release
PHP Bug Type: ODBC related
Bug description: odbc_do & odbc_exec cause a general error.
In PHP3, the odbc_do or odbc_exec worked fine in this script. With PHP4, the only way to get the
script to work is to run odbc_prepare and odbc_execute.
<HEAD>
<TITLE>
NetWork MSSQL Database
</TITLE>
</HEAD>
<BODY BGCOLOR=white>
<?
$dsn = "dsn=clientele";
$odbcuser = "ctel";
$odbcpasswd = "";
$odbcCurType = "SQL_CUR_DEFAULT";
/* Create the connection */
$odbc_connect_id = odbc_connect($dsn, $odbcuser, $odbcpasswd, $odbcCurType);
$sql_query = "SELECT * FROM clientele.ctel.techfullname";
// $result = odbc_do($odbc_connect_id, $sql_query); /* failed */
// $result = odbc_exec($odbc_connect_id, $sql_query); /* failed */
// this works
$result_id = odbc_prepare($odbc_connect_id, $sql_query);
odbc_execute($result_id);
odbc_result_all($result_id, "border=3");
?>
</BODY>
</HTML>