diff options
Diffstat (limited to 'web/lib/aur.inc.php')
-rw-r--r-- | web/lib/aur.inc.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index 51c1eff..6bc36ac 100644 --- a/web/lib/aur.inc.php +++ b/web/lib/aur.inc.php @@ -229,6 +229,11 @@ function db_escape_string($string) { return mysql_real_escape_string($string); } +# Escape strings for usage in SQL LIKE operators. +function db_escape_like($string) { + return addcslashes(mysql_real_escape_string($string), '%_'); +} + # disconnect from the database # this won't normally be needed as PHP/reference counting will take care of # closing the connection once it is no longer referenced |