قائمة pdostatement :: bindparam data_type معلمات
-
11-07-2019 - |
سؤال
هل هناك قائمة تصف جميع معلمات 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.
لا تنتمي إلى StackOverflow