[eluser]Unknown[/eluser]
This is my first CI project. one reason I choose CI what for the cross DB library and the active records. I started out the project with MySql and then had t switch to Oracle.
The active record is not escaping an apostrophe. like in the string "you can't do that."
The code looks simple:
Code:
$comment = $this->input->post('CommentsDenial');
$this->db->set('REQ_DENY_COMMENT_DESC', $comment );
$this->db->where('REQ_OID_NBR', $reqId);
$dbRet = $this->db->update('REQUEST');
I get the error:
A PHP Error was encountered
Severity: Warning
Message: ociparse() [function.ociparse]: ORA-01756: quoted string not properly terminated
Filename: oci8/oci8_driver.php
Line Number: 186
I even tried to call escape first.
Code:
$this->db->set('REQ_DENY_COMMENT_DESC', $this->db->escape($comment) );
With a few debug statements I got this:
Code:
echo $comment . "<BR>";
echo $this->db->escape($comment) . "<BR>";
Dale Pickering said on (09/15/2010 5:06 PM): you can't do that.
'Dale Pickering said on (09/15/2010 5:06 PM): you can't do that.'
All escape did was place single quotes around the whole string. the Apostrophe was not escaped!
So am I missing some settings or is this a bug (maybe with the oci8 driver)?