I have a hard time navigating through Doctrine’s Documentation for the DBAL. I would like to know what string values I can put in the $type value of this:
bindValue($pointername, $variable, $type);
I did not find anything in the documentation that discusses the types.
I’m working with MySQL so I’d like to know the types I can put in the bindValue function that would equate to types like varchar, tinyint, text, datetime, mediumtext, float, etc.
According to http://www.doctrine-project.org/api/dbal/2.0/doctrine/dbal/statement.html#bindValue() the
$typeparameter can be either a PDO type (see http://au.php.net/manual/en/pdo.constants.php) or a dbal mapping type (see http://www.doctrine-project.org/api/dbal/2.0/doctrine/dbal/types/type.html).So you could use
PDO::PARAM_INTorDoctrine\DBAL\Types\Type::Integerby the looks of things.