![]() |
|
Aviso |
Esta función es EXPERIMENTAL. Esto significa que el comportamiento de esta función, el nombre de esta función y en definitiva TODO lo documentado sobre esta función, puede cambiar en una futura version de PHP SIN AVISO. La advertencia queda hecha, y utilizar esta extensión queda bajo su propia responsabilidad. |
PDO::quote() places quotes around the input string and escapes and single quotes within the input string, using a quoting style appropriate to the underlying driver.
If you're using this function to build SQL, it is recommended that you using prepared statements and bound parameters instead, as it is not only more convenient, but often much faster.
Not all PDO drivers implement this method (notably PDO_ODBC). Consider using prepared statements instead.
The string to be quoted.
Provides a data type hint for drivers that have alternate quoting styles. The default value is PDO_PARAM_STR.
Returns a quoted string that is theoretically safe to pass into an SQL statement. Returns FALSE if the driver does not support quoting in this way.
Ejemplo 3. Quoting a complex string
El resultado del ejemplo seria:
|
Hosting by: hurra.com
Generated: 2007-01-26 18:01:04