diff options
author | wei <> | 2007-05-09 11:12:55 +0000 |
---|---|---|
committer | wei <> | 2007-05-09 11:12:55 +0000 |
commit | cb20cf164464b87e76448a8ed4f9b1cb1b1651d4 (patch) | |
tree | 369dbe88b4452b207fa7ae534ac81bb3984995ea | |
parent | 3261f4dcadf1e7aa45446153f654b20530c950b9 (diff) |
fix sqlmap error
-rw-r--r-- | framework/Data/SqlMap/Statements/TPreparedCommand.php | 6 |
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
}
}
}
|