ID:               49509
 Updated by:       j...@php.net
 Reported By:      hymanyung at 163 dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Centos 5.3
 PHP Version:      5.2.10
 New Comment:

http://lmgtfy.com/?q=php+oracle+date


Previous Comments:
------------------------------------------------------------------------

[2009-09-09 07:56:37] hymanyung at 163 dot com

Pls tell me how to define a date type variable in php and pass date
type variable into oracle date type parameter.

------------------------------------------------------------------------

[2009-09-09 07:53:38] hymanyung at 163 dot com

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 this bug report at http://bugs.php.net/?id=49509&edit=1

Reply via email to