From 4d0168e711b817c8b87e7dff5acd90f08d3bb8c8 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Fri, 24 Oct 2014 13:51:16 +0300 Subject: [PATCH] don't display speakers for speakerless events --- load-program.php | 5 +++-- load-workshops.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/load-program.php b/load-program.php index 13d3c56..7731ab1 100644 --- a/load-program.php +++ b/load-program.php @@ -26,8 +26,8 @@ $sched_bg=3940;*/ slots s join halls h on h.id=s.hall_id join events e on s.event_id = e.id join tracks t on t.id=e.track_id - join events_speaker_profiles esp on esp.event_id=e.id - join speaker_profiles sp on esp.speaker_profile_id=sp.id + left join events_speaker_profiles esp on esp.event_id=e.id + left join speaker_profiles sp on esp.speaker_profile_id=sp.id where not s.event_id is null and h.id in (1,2,3) group by h.name, h.id, starts_at, ends_at, t.id, e.title, e.subtitle, e.language, e.id, s.hall_id @@ -88,6 +88,7 @@ while ($row = pg_fetch_object($prg)) { $spkbgarr = array(); $spkenarr = array(); foreach ($spkarr as $val){ + if ($val == "NULL") continue; $spkbgarr[] = ''.htmlentities($val).''; $spkenarr[] = ''.htmlentities($val).''; } diff --git a/load-workshops.php b/load-workshops.php index 91817ef..bc1f9bb 100644 --- a/load-workshops.php +++ b/load-workshops.php @@ -26,8 +26,8 @@ $sched_bg=3940;*/ slots s join halls h on h.id=s.hall_id join events e on s.event_id = e.id join tracks t on t.id=e.track_id - join events_speaker_profiles esp on esp.event_id=e.id - join speaker_profiles sp on esp.speaker_profile_id=sp.id + left join events_speaker_profiles esp on esp.event_id=e.id + left join speaker_profiles sp on esp.speaker_profile_id=sp.id where not s.event_id is null and h.id in (4,5) group by h.name, h.id, starts_at, ends_at, t.id, e.title, e.subtitle, e.language, e.id, s.hall_id @@ -88,6 +88,7 @@ while ($row = pg_fetch_object($prg)) { $spkbgarr = array(); $spkenarr = array(); foreach ($spkarr as $val){ + if ($val == 'NULL') continue; $spkbgarr[] = ''.htmlentities($val).''; $spkenarr[] = ''.htmlentities($val).''; }