lostdreamer - 2:08 pm on Sep 11, 2012 (gmt 0)
SELECT epg.id_epg, epg.id_channel, epg.title, epg.description, tblTVChannels.tvChannelsLogo, tblTVChannels.tvChannelsDesc
FROM epg INNER JOIN tblTVChannels ON epg.id_channel = tblTVChannels.epg_ID
WHERE epg.start < '$programDate' AND tblTVChannels.tvChannelsActive = 1
ORDER BY epg.start DESC
This should give all rows from the epg table, where start < $programDate and the channel = active
But somehow I dont think this is what you wanted? Could you perhaps explain the resultset you would like to have a bit more?