From 559f04e22869e3b54ffc25b22a74aa297bf65c41 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 9 May 2007 04:31:09 +0000 Subject: Fixed #547 --- framework/Data/SqlMap/Statements/TPreparedCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'framework/Data/SqlMap/Statements') diff --git a/framework/Data/SqlMap/Statements/TPreparedCommand.php b/framework/Data/SqlMap/Statements/TPreparedCommand.php index ff5fd6ff..c50ff3e9 100644 --- a/framework/Data/SqlMap/Statements/TPreparedCommand.php +++ b/framework/Data/SqlMap/Statements/TPreparedCommand.php @@ -46,7 +46,10 @@ class TPreparedCommand { $property = $statement->parameterMap()->getProperty($i); $value = $statement->parameterMap()->getPropertyValue($registry,$property, $parameterObject); - $command->bindValue($i+1,$value); + if(!empty($property->getDbType())) + $command->bindValue($i+1,$value, constant($property->getDbType())); //assumes PDO types, e.g. PDO::PARAM_INT + else + $command->bindValue($i+1,$value, TDbCommandBuilder::getPdoType($value)); } } } -- cgit v1.2.3