Select MAX() ... statement w/ ODBC anyone?!
| From: | JPParent | Date: | Fri, 14 Apr 2000 02:09:25 +0000 |
| Subject: | Select MAX() ... statement w/ ODBC anyone?! | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13545@lists.php.net to get a copy of this message | ||
Did anyone succesfully executed and read the resulting resultset with odbc_exec()???
ODBCTEST works just fine so I believe I found a bug in both PHP3.0.16 and PHP 4.0 RC1...
I'm using Win NT 4.0, Oracle 8i release 2 (with newest Oracle drivers) and tried with both PHP
3.0.16
and PHP 4.0 RC1...
The following script generates the error...
<?php
$DSN = "DSN";
$USER = "USER";
$PASSWD = "PASS";
$TABLE = "TABLE";
$COLUMN = "COL";
$conn = odbc_connect($DSN, $USER, $PASSWD);
echo ("The error follows this line...<BR><BR>\n");
$result = odbc_exec($conn, "SELECT MAX($COLUMN) FROM $TABLE");
odbc_result_all($result);
odbc_close($conn);
?>
Thanks.