public function getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = "            ")
 {
     // FIXME - This is a temporary hack to get around apparent bugs w/ PDO+MYSQL
     // See http://pecl.php.net/bugs/bug.php?id=9919
     if ($column->getPDOType() === \PDO::PARAM_BOOL) {
         return sprintf("\n%s\$stmt->bindValue(%s, (int) %s, PDO::PARAM_INT);", $tab, $identifier, $columnValueAccessor);
     }
     return parent::getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab);
 }
Пример #2
0
 /**
  * Get the PHP snippet for binding a value to a column.
  * Warning: duplicates logic from OracleAdapter::bindValue().
  * Any code modification here must be ported there.
  */
 public function getColumnBindingPHP(Column $column, $identifier, $columnValueAccessor, $tab = "            ")
 {
     if ($column->getPDOType() == PropelTypes::CLOB_EMU) {
         return sprintf("%s\$stmt->bindParam(%s, %s, %s, strlen(%s));\n", $tab, $identifier, $columnValueAccessor, PropelTypes::getPdoTypeString($column->getType()), $columnValueAccessor);
     }
     return parent::getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab);
 }