summaryrefslogtreecommitdiff
path: root/framework/Data/SqlMap/Statements/TPreparedCommand.php
diff options
context:
space:
mode:
authorwei <>2007-05-09 11:12:55 +0000
committerwei <>2007-05-09 11:12:55 +0000
commitcb20cf164464b87e76448a8ed4f9b1cb1b1651d4 (patch)
tree369dbe88b4452b207fa7ae534ac81bb3984995ea /framework/Data/SqlMap/Statements/TPreparedCommand.php
parent3261f4dcadf1e7aa45446153f654b20530c950b9 (diff)
fix sqlmap error
Diffstat (limited to 'framework/Data/SqlMap/Statements/TPreparedCommand.php')
-rw-r--r--framework/Data/SqlMap/Statements/TPreparedCommand.php6
1 files changed, 3 insertions, 3 deletions
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
}
}
}