1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-18 14:31:19 +02:00

[ticket/16538] Add identifiers quoting

If reserved word is used as identifier, it must be quoted.
If alias is used elsewhere in SQL statement, it must be quoted.

PHPBB3-16535
PHPBB3-16538
This commit is contained in:
rxu
2020-06-27 12:11:48 +07:00
parent 3bbe0f1d4e
commit 0bc9d87891
10 changed files with 62 additions and 6 deletions

View File

@@ -464,4 +464,12 @@ interface driver_interface
* @return string A SQL statement like: "IN (1, 2, 3, 4)" or "= 1"
*/
public function sql_in_set($field, $array, $negate = false, $allow_empty_set = false);
/**
* Quote identifiers used in sql query
*
* @param string $msg String to be quoted
* @return string Quoted version of $msg
*/
public function sql_quote($msg);
}