From: hymanyung at 163 dot com Operating system: Centos 5.3 PHP version: 5.2.10 PHP Bug Type: OCI8 related Bug description: ann't send a date type into oracle parameter
Description: ------------ I want to pass a date type variable into oracle's procedure. But It automate converts date type into string. Reproduce code: --------------- $sql = 'declare ws_time date := :mydate; begin select con_id from home.zcontp00; end; $stmt = oci_parse($this->conn, $sql); $my_cursor = ociNewCursor($this->conn); $now = date('Y-m-d',strtotime('2009-09-08')); OCIBindByName($stmt, ":mydate",$now); OCIBindByName($stmt, ":c1", $my_cursor, -1, OCI_B_CURSOR); OCIExecute($stmt); OCIExecute($my_cursor); while ($val = oci_fetch_assoc($my_cursor)){ echo $val['CON_ID']; } Expected result: ---------------- Above Report error. " literal does not match format string " -- Edit bug report at http://bugs.php.net/?id=49509&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49509&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49509&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49509&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49509&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49509&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49509&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49509&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49509&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49509&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49509&r=support Expected behavior: http://bugs.php.net/fix.php?id=49509&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49509&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49509&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49509&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49509&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49509&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49509&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49509&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49509&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49509&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49509&r=mysqlcfg