cc-4347: PDO getRepeatingDate()
This commit is contained in:
parent
23ccd75290
commit
727769b376
1 changed files with 10 additions and 7 deletions
|
@ -528,15 +528,18 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public function getRepeatingEndDate()
|
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();
|
$query = Application_Common_Database::prepareAndExecute( $sql,
|
||||||
$sql = "SELECT last_show FROM cc_show_days"
|
array( 'showId' => $this->getId() ), 'column' );
|
||||||
." WHERE show_id = $showId"
|
|
||||||
." ORDER BY last_show DESC";
|
|
||||||
|
|
||||||
$query = $con->query($sql)->fetchColumn(0);
|
|
||||||
|
|
||||||
|
/* TODO: Why return empty string instead of false? very confusing --RG
|
||||||
|
*/
|
||||||
return ($query !== false) ? $query : "";
|
return ($query !== false) ? $query : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue