mysqli_real_escape_string
mysqli_real_escape_string — Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection.Description
mysqli_real_escape_string( mysqli $mysql, string $string ): stringThis function is used to create a legal SQL string that you can use in an SQL statement. The given string is encoded to produce an escaped SQL string, taking into account the current character set of the connection.
Parameters
A mysqli_result object returned by mysqli_query(), mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
mysql
Procedural style only: A mysqli object returned by mysqli_connect() or mysqli_init()
string
The string to be escaped.
Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
Return Values
Returns an escaped string.More information about mysqli_real_escape_string on official PHP documentation site
mysqli_real_escape_string - Popular snippets
- PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
last run:
2024-06-12 14:08:05
22
- PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
last run:
2023-10-14 14:34:20
10
- PHP 8.0 / MySQL 5.7 mysqli_real_escape_string var_dump
last run:
2023-01-20 16:20:24
9
- PHP 8.0 / MySQL 5.7 mysqli_real_escape_string mysqli_query mysqli_fetch_assoc print_r
last run:
2023-10-27 17:30:50
8
- PHP 8.0 / MySQL 5.7 mysqli_real_escape_string var_dump
last run:
2021-10-14 14:32:22
6
- PHP 8.1 / MySQL 5.7 stripslashes mysqli_real_escape_string date md5 mysqli_query
last run:
2023-12-08 06:07:22
4
- PHP 8.1 / MySQL 5.7 mysqli_real_escape_string vsprintf mysqli_query json_encode
last run:
2022-11-05 18:39:33
4
- PHP 8.1 / MySQL 8.0 mysqli_prepare mysqli_real_escape_string
last run:
2024-02-03 13:34:14
3
- PHP 5.6 / MySQL 5.7 printf urlencode mysqli_real_escape_string
last run:
2023-10-27 10:08:20
3
- PHP 8.0 / MySQL 5.7 stripslashes mysqli_real_escape_string md5 mysqli_query json_encode mysqli_error mysqli_num_rows var_dump
last run:
2022-02-08 11:03:09
3
mysqli_real_escape_string - New snippets
-
PHP 8.1 / MySQL 5.7 var_dump mysqli_real_escape_string
added at:
2024-10-03 18:32:50
1
-
PHP 8.1 / MySQL 5.7 var_dump mysqli_real_escape_string
added at:
2024-10-03 18:32:44
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:09:06
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:09:01
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:08:53
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:08:22
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:07:53
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:07:41
1
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:07:30
2
-
PHP 8.1 / MySQL 5.7 mysqli_real_escape_string
added at:
2024-06-01 15:01:18
1