mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
Implemented escapeLike() for Oracle driver
This commit is contained in:
committed by
David Grudl
parent
8c8b3c3dc1
commit
3288b38b6c
@@ -267,7 +267,9 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
*/
|
||||
public function escapeLike($value, $pos)
|
||||
{
|
||||
throw new DibiNotImplementedException;
|
||||
$value = addcslashes(str_replace('\\', '\\\\', $value), "\x00\\%_");
|
||||
$value = str_replace("'", "''", $value);
|
||||
return ($pos <= 0 ? "'%" : "'") . $value . ($pos >= 0 ? "%'" : "'");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user