cc-4347: PDOOO
This commit is contained in:
parent
92682b9f89
commit
22a250b5d2
|
@ -355,14 +355,22 @@ SQL;
|
||||||
$uncheckedDaysImploded = implode(",", $daysRemovedUTC);
|
$uncheckedDaysImploded = implode(",", $daysRemovedUTC);
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
|
|
||||||
|
$esc_uncheckedDays = pg_escape_string($uncheckedDaysImploded);
|
||||||
$timestamp = gmdate("Y-m-d H:i:s");
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
|
|
||||||
$sql = "DELETE FROM cc_show_instances"
|
$sql = <<<SQL
|
||||||
." WHERE EXTRACT(DOW FROM starts) IN ($uncheckedDaysImploded)"
|
DELETE
|
||||||
." AND starts > TIMESTAMP '$timestamp'"
|
FROM cc_show_instances
|
||||||
." AND show_id = $showId";
|
WHERE EXTRACT(DOW FROM starts) IN ($esc_uncheckedDays)
|
||||||
|
AND starts > :timestamp::TIMESTAMP
|
||||||
|
AND show_id = :showId
|
||||||
|
SQL;
|
||||||
|
|
||||||
$con->exec($sql);
|
Application_Common_Database::prepareAndExecute( $sql,
|
||||||
|
array(
|
||||||
|
":timestamp" => $timestamp,
|
||||||
|
":showId" => $showId,
|
||||||
|
), "execute");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue