gcdb::add_placeholder_escape()
最后更新于:2021-11-26 07:49:20
gcdb::add_placeholder_escape( string$query)Adds a placeholder escape string, to escape anything that resembles a printf() placeholder.
参数
- $query
-
(string) (Required) The query to escape.
响应
(string) The query with the placeholder escape string inserted where necessary.
源文件
文件: gc-includes/gc-db.php
public function add_placeholder_escape( $query ) {
/*
* To prevent returning anything that even vaguely resembles a placeholder,
* we clobber every % we can find.
*/
return str_replace( '%', $this->placeholder_escape(), $query );
}