![]() |
|
Avvertimento |
Questa funzione è SPERIMENTALE. Ovvero, il comportamento di questa funzione, il nome di questa funzione, in definitiva tutto ciò che è documentato qui può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l'uso di questa funzione è a vostro rischio. |
PDO::quote() places quotes around the input string and escapes and single quotes within the input string. Quoting input strings has been a common means of attempting to prevent SQL injection attacks; however, an even safer approach is to use prepared statements with named parameters or placeholders for the input values.
Not all PDO drivers implement this method.
The string to be quoted.
Provides a data type hint for drivers that have alternate quoting styles. The default value is PDO_PARAM_STR.
Esempio 3. Quoting a complex string
The above example will output:
|
Hosting by: hurra.com
Generated: 2007-01-26 17:56:31