summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
authorwei <>2007-05-14 03:50:35 +0000
committerwei <>2007-05-14 03:50:35 +0000
commit7429863609d6c5708b4414d3619bdf152de2ea16 (patch)
tree9b537f69144ccee1bb4478a4ebffad231d44da2f /framework/Data
parentdc00d5730623cad061316553c1e886fbe1c17389 (diff)
Minor update to TPreparedCommand
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/SqlMap/Statements/TPreparedCommand.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/Data/SqlMap/Statements/TPreparedCommand.php b/framework/Data/SqlMap/Statements/TPreparedCommand.php
index 4ca41d73..06566a16 100644
--- a/framework/Data/SqlMap/Statements/TPreparedCommand.php
+++ b/framework/Data/SqlMap/Statements/TPreparedCommand.php
@@ -47,10 +47,13 @@ class TPreparedCommand
{
$property = $statement->parameterMap()->getProperty($i);
$value = $statement->parameterMap()->getPropertyValue($registry,$property, $parameterObject);
- if($property->getDbType()=='')
+ $dbType = $property->getDbType();
+ if($dbType=='') //relies on PHP lax comparison
$command->bindValue($i+1,$value, TDbCommandBuilder::getPdoType($value));
- else
+ else if(strpos($dbType, 'PDO::')===0)
$command->bindValue($i+1,$value, constant($property->getDbType())); //assumes PDO types, e.g. PDO::PARAM_INT
+ else
+ $command->bindValue($i+1,$value);
}
}
}