Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function sqlLikeString($str, $wildcard = '%', $appendWildcard = true)
 {
     $str = str_replace(array('['), array('[[]'), $str);
     return parent::sqlLikeString($str, $wildcard, $appendWildcard);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function sqlLikeString($str, $wildcard = "%", $appendWildcard = true)
 {
     $str = parent::sqlLikeString($str, $wildcard, $appendWildcard);
     // We need to double any backslashes that may exist in $str, for a MySQL LIKE clause.
     // See here: http://dev.mysql.com/doc/refman/5.6/en/string-comparison-functions.html
     // Note: This replaces one backslash with two, not two with four ;)
     $str = str_replace("\\", "\\\\", $str);
     return $str;
 }