php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5642 OCI functions do not work with Oracle's to_date($string, format) function
Submitted: 2000-07-17 12:35 UTC Modified: 2006-07-17 08:09 UTC
From: jnguyen at scrtec dot org Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.0 Release Candidate 2 OS: Digital UNIX V5.0 (Rev. 910)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 34 = ?
Subscribe to this entry?

 
 [2000-07-17 12:35 UTC] jnguyen at scrtec dot org
$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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-23 08:12 UTC] sniper@php.net
Is this still happening with more recent versions of 
php4 (from CVS or snapshot from http://snaps.php.net/ ) ??

--Jani
 [2000-08-25 05:48 UTC] thies@php.net
php does _not_ touch the string you pass to oracle - please make sure your NLS_LANG environment is set correct in your apache process. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC