Welcome Guest, Not a member yet? Register   Sign In
escape question
#4

[eluser]timotheus[/eluser]
@dadamssg87 - I recently came across the same thing. You want to use:

$this->db->escape_like_str()

Code:
$sql = "SELECT id FROM table WHERE column LIKE '%".$this->db->escape_like_str($search)."%'";

It's found in the Escaping Queries section, option 3.

http://ellislab.com/codeigniter/user-gui...eries.html

@InsiteFX - Sometimes I find Active Record to be more cumbersome than it's worth. I use both methods where it makes sense. Smile


Messages In This Thread
escape question - by El Forum - 04-22-2011, 11:37 AM
escape question - by El Forum - 04-22-2011, 02:20 PM
escape question - by El Forum - 04-22-2011, 03:13 PM
escape question - by El Forum - 04-28-2011, 04:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB