PHP » GoLang |
login |
register |
about
|
GoLang mysqli::real_escape_string
request it (516)
GoLang replacement for PHP's mysqli::real_escape_string
[edit | history]
PHP mysqli::real_escape_stringPHP original manual for mysqli::real_escape_string [ show | php.net ]mysqli::real_escape_stringmysqli::escape_stringmysqli_real_escape_string(PHP 5, PHP 7) mysqli::real_escape_string -- mysqli::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 DescriptionObject oriented style
string mysqli::real_escape_string
( string
$escapestr
)Procedural style 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. Caution
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. Parameters
Return ValuesReturns an escaped string. Errors/Exceptions
Executing this function without a valid MySQLi connection passed in will
return ExamplesExample #1 mysqli::real_escape_string() example Object oriented style
<?php Procedural style
<?php The above examples will output: Error: 42000 1 Row inserted. Notes
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|