CI_DB_driver::escape_like_str()

escape_like_str($str)

Parameters:
  • $str (mixed) – A string value or array of multiple ones
Returns:

The escaped string(s)

Return type:

mixed

Escape LIKE strings.

Similar to escape_str(), but will also escape the % and _ wildcard characters, so that they don’t cause false-positives in LIKE conditions.

Important

The escape_like_str() method uses ‘!’ (exclamation mark) to escape special characters for LIKE conditions. Because this method escapes partial strings that you would wrap in quotes yourself, it cannot automatically add the ESCAPE '!' condition for you, and so you’ll have to manually do that.

doc_CodeIgniter
2016-10-15 16:31:05
Comments
Leave a Comment

Please login to continue.