mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
Added wrapper function for mysql_real_escape_string
This commit is contained in:
parent
1cd6926f4f
commit
a47e66a6a6
@ -371,6 +371,14 @@ function close_connection($link)
|
||||
}
|
||||
}
|
||||
|
||||
function db_escape_string($string, $link = NULL)
|
||||
{
|
||||
if ( is_null($link) ) {
|
||||
return mysql_real_escape_string($string);
|
||||
}
|
||||
return mysql_real_escape_string($string, $link);
|
||||
}
|
||||
|
||||
function perform_query($query, $link)
|
||||
{
|
||||
mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
|
||||
|
Loading…
Reference in New Issue
Block a user