PdoValue
API reference › yii › db › PdoValue
Class PdoValue represents a $value that should be bound to PDO with exact $type.
For example, it will be useful when you need to bind binary data to BLOB column in DBMS:
[':name' => 'John', ':profile' => new PdoValue($profile, \PDO::PARAM_LOB)]`.To see possible types, check PDO::PARAM_* constants.
See also: https://www.php.net/manual/en/pdostatement.bindparam.php.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | PdoValue constructor. | PdoValue |
getType() | PdoValue | |
getValue() | PdoValue |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(mixed $value, mixed $type)PdoValue constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed | |
$type | mixed |