PDOStatement :: bindParam data_type参数列表 [英] List of PDOStatement::bindParam data_type parameters

查看:88
本文介绍了PDOStatement :: bindParam data_type参数列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个列表,描述了您可以在PDOStatement::bindParam()中使用的所有data_type参数?如果没有,您通常使用什么?对于哪种类型的字段?

Is there a list describing all of the data_type parameters you can use in PDOStatement::bindParam() ? If none, what do you commonly use, and for what type of field ?

根据PHP手册: data_type 使用PDO :: PARAM_ *常量的参数的显式数据类型.

According to PHP manual: data_type Explicit data type for the parameter using the PDO::PARAM_* constants.

我了解PDO::PARAM_INTPDO::PARAM_STR.我听说过PDO::PARAM_LOB,但是我不确定如何以及何时使用它. (用于日期?)

I know about the PDO::PARAM_INT and PDO::PARAM_STR . I've heard of PDO::PARAM_LOB but I wasn't sure how and when to use that, though. (for date ?)

推荐答案

从文档这里:

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.

这篇关于PDOStatement :: bindParam data_type参数列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆