Elenco dei parametri PDOStatement :: bindParam data_type
-
11-07-2019 - |
Domanda
C'è un elenco che descrive tutti i parametri data_type che puoi usare in PDOStatement :: bindParam ()
? Se nessuno, cosa usi comunemente e per quale tipo di campo?
Secondo il manuale di PHP: data_type Tipo di dati esplicito per il parametro che utilizza le costanti PDO :: PARAM_ *.
Conosco PDO :: PARAM_INT
e PDO :: PARAM_STR
. Ho sentito parlare di PDO :: PARAM_LOB
ma non ero sicuro di come e quando utilizzarlo. (per data?)
Soluzione
Dalla documentazione qui :
PDO::PARAM_BOOL (integer) Represents a boolean data type. PDO::PARAM_NULL (integer) Represents the SQL NULL data type. PDO::PARAM_INT (integer) Represents the SQL INTEGER data type. PDO::PARAM_STR (integer) Represents the SQL CHAR, VARCHAR, or other string data type. PDO::PARAM_LOB (integer) Represents the SQL large object data type. PDO::PARAM_STMT (integer) Represents a recordset type. Not currently supported by any drivers. PDO::PARAM_INPUT_OUTPUT (integer) Specifies that the parameter is an INOUT parameter for a stored procedure. You must bitwise-OR this value with an explicit PDO::PARAM_* data type.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow