![]() |
Enable true oci_bind_by_name funciton - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Enable true oci_bind_by_name funciton (/showthread.php?tid=36801) |
Enable true oci_bind_by_name funciton - El Forum - 12-15-2010 [eluser]cyu021[/eluser] Tried to use oci_bind_by_name() for Oracle DB and couldn't get it to work. Then I find there is some fix need to be done in CI's code. This is how I apply the fix. Step 1. _CI_ROOT_/system/database/DB_driver.php >>> line 293: Code: -- Code: -- Code: -- Step 2. _CI_ROOT_/system/database/drivers/oci8/oci8_driver.php >>> line 165: Code: -- Code: -- How to use it: Code: $sql = "insert Enable true oci_bind_by_name funciton - El Forum - 12-31-2010 [eluser]MVUG[/eluser] I get the following error: Fatal error: Only variables can be passed by reference in system/database/drivers/oci8/oci8_driver.php on line 176 Enable true oci_bind_by_name funciton - El Forum - 12-31-2010 [eluser]InsiteFX[/eluser] You can not extend the database library and you should not be making changes to it, because when a new version or update comes out your code will be over written! InsiteFX Enable true oci_bind_by_name funciton - El Forum - 01-01-2011 [eluser]cyu021[/eluser] [quote author="tuurtnt" date="1293816894"]I get the following error: Fatal error: Only variables can be passed by reference in system/database/drivers/oci8/oci8_driver.php on line 176[/quote] which version are you running? mine is 1.7 or maybe you can leave your email to my PM so i can send the modified files to you Enable true oci_bind_by_name funciton - El Forum - 01-01-2011 [eluser]cyu021[/eluser] [quote author="InsiteFX" date="1293819015"]You can not extend the database library and you should not be making changes to it, because when a new version or update comes out your code will be over written! InsiteFX[/quote] is it possible to put the proposed changes to trunk? i think it is a nice feature to have Enable true oci_bind_by_name funciton - El Forum - 01-02-2011 [eluser]MVUG[/eluser] [quote author="cyu021" date="1293963902"][quote author="tuurtnt" date="1293816894"]I get the following error: Fatal error: Only variables can be passed by reference in system/database/drivers/oci8/oci8_driver.php on line 176[/quote] which version are you running? mine is 1.7 or maybe you can leave your email to my PM so i can send the modified files to you[/quote] I use 1.7.3. I found that the problem is generated by custom queries I do in my app... Enable true oci_bind_by_name funciton - El Forum - 07-18-2014 [eluser]Unknown[/eluser] CodeIgniter's oci8_dirver is not a great implementation for an oracle driver. I had to make several changes to it in order to get it to do some advanced use of oracle capabilities. On my custom version I included "true" bind variables support while keeping the "escaped" bind variables implemented by CodeIgniter. Another issue is with function oci_set_prefetch which value is fixed and hardcoded. There is any way to contribute these changes so the oci8_driver can be improved in future versions? Enable true oci_bind_by_name funciton - El Forum - 07-18-2014 [eluser]CroNiX[/eluser] Sure, here: https://github.com/EllisLab/CodeIgniter |