CC-5109: Fix race-condition when updating cc_pref table
This commit is contained in:
parent
ad82b4ff98
commit
9f6a1033ea
2 changed files with 19 additions and 4 deletions
|
@ -2,9 +2,11 @@
|
|||
class Application_Common_Database
|
||||
{
|
||||
public static function prepareAndExecute($sql, array $paramValueMap,
|
||||
$type='all', $fetchType=PDO::FETCH_ASSOC)
|
||||
$type='all', $fetchType=PDO::FETCH_ASSOC, $con=null)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
if (is_null($con)) {
|
||||
$con = Propel::getConnection();
|
||||
}
|
||||
$stmt = $con->prepare($sql);
|
||||
foreach ($paramValueMap as $param => $v) {
|
||||
$stmt->bindValue($param, $v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue