|
PHP5中文手册
maxdb_real_escape_stringmaxdb->real_escape_string(PECL maxdb:1.0-7.6.00.38) maxdb->real_escape_string — Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection 说明Procedural style:
string maxdb_real_escape_string
( resource $link
, string $escapestr
)
Object oriented style (method): maxdb
string
real_escape_sring
( string $escapestr
)
This function is used to create a legal SQL string that you can use in a SQL statement. The string escapestr is encoded to an escaped SQL string, taking into account the current character set of the connection. Characters encoded are ', ". 返回值Returns an escaped string. 范例Example#1 Object oriented style
<?php Example#2 Procedural style
<?php The above examples would produce the following output:
|