News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell's Blog:
Stopping CodeIgniter from Escaping SQL
January 28, 2010 @ 13:39:45

In a project she's been working on Lorna Mitchell was frustrated with something the CodeIgniter framework does natively - escape SQL statements done through the databaase layer's "select()" method. Thankfully, there was a simple fix to turn this behavior off.

I've been getting increasingly impatient with its tendency to try to escape my SQL code for me - this is a really useful default feature but it seems to assume I don't know what I'm doing and so it puts backticks all over perfectly acceptable SQL code, very annoying!

Thanks to a reply on twitter from damiangostomski to her frustrations she found the optional second parameter you can give the "select()" method, a boolean that tells it whether or not to escape the query (it's mentioned here) for those that were wondering.

2 comments voice your opinion now!
codeigniter escape sql optional parameter


blog comments powered by Disqus

Similar Posts

Frank Wu's Blog: Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter

Hasin Hayder's Blog: Vulnerable bug in CodeIgniter which took us hours to fix our corrupted database

The Credence Blog: PHP frameworks - Which one is Most Suitable for you?

Christopher Jones' Blog: When a few seconds are important: improving PHP Oracle connection speed

NetTuts.com: Building a CodeIgniter Web Application From Scratch - Part 1


Community Events





Don't see your event here?
Let us know!


framework security composer laravel list community symfony series interview release introduction conference tool library artisanfiles version opinion podcast voicesoftheelephpant language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework