|
mysqli::real_escape_stringmysqli_real_escape_stringEscapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection BeschreibungObjektorientierter Stil
string mysqli::escape_string
( string
$escapestr
)
string mysqli::real_escape_string
( string
$escapestr
)Prozeduraler Stil
string mysqli_real_escape_string
( mysqli
$link
, string $escapestr
)This function is used to create a legal SQL string that you can use in an SQL statement. The given string is encoded to an escaped SQL string, taking into account the current character set of the connection. Achtung
Security: the default character setThe character set must be set either at the server level, or with the API function mysqli_set_charset for it to affect mysqli_real_escape_string. See the concepts section on character sets for more information. Parameter-Liste
RückgabewerteReturns an escaped string. BeispieleBeispiel #1 mysqli::real_escape_string example Objektorientierter Stil
<?phpProzeduraler Stil
<?phpDie obigen Bespiele erzeugen folgende Ausgabe: Error: 42000 1 Row inserted. Anmerkungen
Siehe auch
|