Codeigniter escape_str() function

This function will escape all data, regardless of type.

$sql = " INSERT INTO table (name)
  VALUES(" . $this->db->escape_str( $name) . " ) " ;
$this->db- >query($sql) ;
Share Article/Example:
  • Facebook
  • Twitter
  • del.icio.us
  • Digg
  • DotNetKicks
  • DZone