的PDOStatement对象:: bindParam DATA_TYPE参数列表
-
11-07-2019 - |
题
有描述所有你可以在PDOStatement::bindParam()
使用DATA_TYPE参数列表?如果没有,那你通常使用,以及什么类型的字段?
根据PHP手册: DATA_TYPE 使用PDO :: PARAM_ *常量参数的显式数据类型。
我知道有关PDO::PARAM_INT
和PDO::PARAM_STR
。我听说PDO::PARAM_LOB
的,但我不知道如何以及何时使用,虽然。 (日期?)
解决方案
从文档此处:
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.
不隶属于 StackOverflow