Home Teaching Bible Lyrics Videos Advertising
select B.locationId,B.programId,B.name,if (now() > start,'showStarted',if (unix_timestamp(B.start) - unix_timestamp() > 1600, 'showAnn','showWarning')) as ready,B.ann FROM liveInfo A,live B where A.locationID = B.locationID and unix_timestamp() BETWEEN unix_timestamp(B.start) - 42000 and unix_timestamp(B.end) order by B.start,B.locationId