문제

사용할 수있는 모든 data_type 매개 변수를 설명하는 목록이 있습니까? PDOStatement::bindParam() ? 없다면 일반적으로 무엇을 사용하고 어떤 유형의 필드를 사용합니까?

PHP 매뉴얼에 따르면 : 데이터 형식 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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top