/ Published in: PHP

Patch for sfPropelMigrationsLightPlugin 1.1.2 installed on Symfony 1.2. In sfMigrator.class.php, add "$con->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);" to the following functions:
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
static public function executeUpdate($sql) { $con = Propel::getConnection(); $con->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); } static public static function executeQuery($sql, $fetchmode = null) { $con = Propel::getConnection(); $con->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); if ($con instanceof PropelPDO) { $stmt = $con->prepare($sql); $stmt->execute(); return $stmt; } else { return $con->executeQuery($sql, $fetchmode); } }
Comments
