cc-4347: PDO getRepeatingDate()

This commit is contained in:
Rudi Grinberg 2012-09-07 12:18:13 -04:00
parent 23ccd75290
commit 727769b376

View file

@ -528,15 +528,18 @@ SQL;
*/
public function getRepeatingEndDate()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT last_show
FROM cc_show_days
WHERE show_id = :showId
ORDER BY last_show DESC
SQL;
$showId = $this->getId();
$sql = "SELECT last_show FROM cc_show_days"
." WHERE show_id = $showId"
." ORDER BY last_show DESC";
$query = $con->query($sql)->fetchColumn(0);
$query = Application_Common_Database::prepareAndExecute( $sql,
array( 'showId' => $this->getId() ), 'column' );
/* TODO: Why return empty string instead of false? very confusing --RG
*/
return ($query !== false) ? $query : "";
}