Mantis - Quercus
Viewing Issue Advanced Details
2267 minor always 12-19-07 08:08 05-29-08 12:19
sergpro  
ferg  
normal  
closed 3.1.4  
fixed  
none    
none 3.2.0  
0002267: PDO bind problem
getting java.sql.SQLException: ORA-00911: invalid character exception for statement where bind is using

-- example of issue
<?php
$pdo = new PDO("java:comp/env/jdbc/db");
$query = "Insert into table_web (CLICK_ID,CAMPAIGN_ID,WSESSION_ID,URL) values (?,?,?,?)";

$DummyValue='a';
$WebSessionID='1677631';
$WebURL='localhost8080';

$stid = $pdo->prepare( $query);
$stid->bindValue( 1, $DummyValue);
$stid->bindValue( 2, $DummyValue);
$stid->bindValue( 3, $WebSessionID);
$stid->bindValue( 4, $WebURL);

$stid->execute() || die ('Error! ' . $stid->errorCode());
?>

-- but following code without binding works fine
<?php
$pdo = new PDO("java:comp/env/jdbc/db");
$query = "Insert into table_web (CLICK_ID,CAMPAIGN_ID,WSESSION_ID,URL) values ('a','a','1677631','localhost8080')";
$stid->execute() || die ('Error! ' . $stid->errorCode());
?>

Notes
(0003113)
ferg   
05-29-08 12:19   
php/1s41