CC-3732: NationTalk Database upgrade fail, from 2.0.3 to 2.1.0

-fixed
This commit is contained in:
root 2012-05-03 16:13:50 -04:00
parent 81d7e0c80f
commit 80898ec898
181 changed files with 72643 additions and 58 deletions

View file

@ -0,0 +1,19 @@
<?php
class Common {
public static function setTimeInSub($row, $col, $time)
{
$class = get_class($row).'Peer';
$con = Propel::getConnection($class::DATABASE_NAME);
$sql = 'UPDATE '.$class::TABLE_NAME
. ' SET '.$col.' = :f1'
. ' WHERE ' .$class::ID. ' = :p1';
$stmt = $con->prepare($sql);
$stmt->bindValue(':f1', $time);
$stmt->bindValue(':p1', $row->getDbId());
$stmt->execute();
}
}