PHP 4.0 Bug #5642: OCI functions do not work with Oracle's to_date($string, format) function

From: Date: Mon, 17 Jul 2000 16:35:31 +0000
Subject: PHP 4.0 Bug #5642: OCI functions do not work with Oracle's to_date($string, format) function
Groups: php.dev 
Request: Send a blank email to php-dev+get-24786@lists.php.net to get a copy of this message
From: jnguyen@scrtec.org Operating system: Digital UNIX V5.0 (Rev. 910) PHP version: 4.0 Release Candidate 2 PHP Bug Type: Oracle related Bug description: OCI functions do not work with Oracle's to_date($string, format) function $sql1 = "SELECT id, the_date FROM a_table WHERE the_date < to_date('01-JAN-99')"; $stmt = OCIparse($conn, $sql1); OCIexecute($stmt); while(OCIfetch($stmt)) { ... } The PHP script above returns everything, including records newer than 01-JAN-99, from the table, whereas when I cut and paste the SQL statement into SQL*PLUS, the correct number of results is fetched.

« previous php.dev (#24786) next »