ID:               35919
 Updated by:       [EMAIL PROTECTED]
 Reported By:      atixier at france-loisirs dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: AIX 4.3.3
 PHP Version:      5CVS-2006-01-06 (snap)
-Assigned To:      
+Assigned To:      wez


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

[2006-01-06 16:17:28] atixier at france-loisirs dot com

Description:
------------
I'm testing PDO with Oracle 9iR2.
Evrything is OK, but I experience two problems whith PDO:Prepare when
using question mark or names parameters.

Whith this sequence:
$stmt=$dbh->prepare("insert into R_QQQ (QUANTIEME,RUN) values (?,?)");
$stmt->execute(array("ZYX", "053"));  
$stmt=$dbh->query("select * from R_QQQ");
$rows=$stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
  print("<pre>\n");
  print_r($row);
  print("</pre>\n");
}
I get the following result:
Array
(
    [RUN] => 053
    [DH_FIN] => 06-JAN-06
    [QUANTIEME] => 053
)

Second bug: when I try to insert a date whith the following command:
$stmt=$dbh->prepare("insert into R_QQQ (QUANTIEME,DH_FIN,RUN) values
(?,?,?)");
$stmt->execute(array("ZYX", "to_date('20050222','YYYYMMDD')","053"));
I get an error ORA-01861:
SQLSTATE[HY000]: General error: 1861 OCIStmtExecute: ORA-01861: literal
does not match format string
(/prod/outils/php5.1-200601051130/ext/pdo_oci/oci_statement.c:142)

Everyting is OK when using directly: 
PDO:exec ("insert ...");

Thank you for your help.

Expected result:
----------------
Array
(
    [RUN] => ZYX
    [DH_FIN] => 22-FEB-05
    [QUANTIEME] => 053
)

Actual result:
--------------
Array
(
    [RUN] => 053
    [DH_FIN] => 06-JAN-06
    [QUANTIEME] => 053
)


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


-- 
Edit this bug report at http://bugs.php.net/?id=35919&edit=1

Reply via email to