PDF (US Ltr)- 2.4Mb
PDF (A4)- 2.4Mb
HTML Download (TGZ)- 251.4Kb
HTML Download (Zip)- 258.9Kb
Copyright 1997-2021 the PHP Documentation Group.
Session::quoteName
Add quotes
Description
publicstringmysql_xdevapi\Session::quoteName(stringname);
A quoting function to escape SQL names and identifiers. It escapes the identifier given in accordance to the settings of the current connection. This escape function should not be used to escape values.
Parameters
-
name
-
The string to quote.
Return Values
The quoted string.
Examples
Example 5.122mysql_xdevapi\Session::quoteName
example
quoteName($first)); $second = 'Another `test` "like" `this`'; var_dump($second); var_dump($session->quoteName($second)); ?>
The above example will output something similar to:
string(12) "MySQL's test" string(14) "`MySQL's test`" string(28) "Another `test` "like" `this`" string(34) "`Another ``test`` "like" ``this```"