cc-4347: GetShowInstanceCount() pdo'd
This commit is contained in:
parent
375e89169e
commit
e2c2f67fbb
|
@ -809,11 +809,13 @@ SQL;
|
||||||
// returns number of show instances that ends later than $day
|
// returns number of show instances that ends later than $day
|
||||||
public static function GetShowInstanceCount($day)
|
public static function GetShowInstanceCount($day)
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
$sql = <<<SQL
|
||||||
$con = Propel::getConnection();
|
SELECT count(*) AS cnt
|
||||||
$sql = "SELECT count(*) as cnt FROM $CC_CONFIG[showInstances] WHERE ends < '$day'";
|
FROM cc_show_instances
|
||||||
|
WHERE ends < '$day'
|
||||||
return $con->query($sql)->fetchColumn(0);
|
SQL;
|
||||||
|
return Application_Common_Database::prepareAndExecute( $sql,
|
||||||
|
array( ':day' => $day ), 'column' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// this returns end timestamp of all shows that are in the range and has live DJ set up
|
// this returns end timestamp of all shows that are in the range and has live DJ set up
|
||||||
|
|
Loading…
Reference in New Issue