diff options
| -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
  		}
  	}
  }
  | 
