From cb20cf164464b87e76448a8ed4f9b1cb1b1651d4 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 9 May 2007 11:12:55 +0000 Subject: fix sqlmap error --- framework/Data/SqlMap/Statements/TPreparedCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'framework/Data/SqlMap/Statements') diff --git a/framework/Data/SqlMap/Statements/TPreparedCommand.php b/framework/Data/SqlMap/Statements/TPreparedCommand.php index c50ff3e9..5733b14a 100644 --- a/framework/Data/SqlMap/Statements/TPreparedCommand.php +++ b/framework/Data/SqlMap/Statements/TPreparedCommand.php @@ -46,10 +46,10 @@ class TPreparedCommand { $property = $statement->parameterMap()->getProperty($i); $value = $statement->parameterMap()->getPropertyValue($registry,$property, $parameterObject); - if(!empty($property->getDbType())) - $command->bindValue($i+1,$value, constant($property->getDbType())); //assumes PDO types, e.g. PDO::PARAM_INT + if($property->getDbType()=='') + $command->bindValue($i+1,$value, TDbCommandBuilder::getPdoType($value)); else - $command->bindValue($i+1,$value, TDbCommandBuilder::getPdoType($value)); + $command->bindValue($i+1,$value, constant($property->getDbType())); //assumes PDO types, e.g. PDO::PARAM_INT } } } -- cgit v1.2.3