[ci 1.7.3] Oracle active record escaping |
[eluser]MVUG[/eluser]
CI 1.7.3 does not do escaping very well (when using activerecord). Does anybody have a fix for this? Queries like: INSERT INTO table (nr, data) VALUES (1, 'test's'); also check this: http://ellislab.com/forums/viewthread/167638/
[eluser]MVUG[/eluser]
Ok I solved the problem... Oracle uses ' (quotes) to escape quotes... So the looks like: INSERT INTO table (nr, data) VALUES (1, 'test''s'); I updated 1 function (escape_str) in system/database/drivers/oci8/oci8_driver.php. Code: /** I added Code: $str = str_replace("'", "''", $str); |
Welcome Guest, Not a member yet? Register Sign In |