Maybe with some sort of join? I feel like using two queries is not as efficient as I could be. Basically, I'm trying to find the latest series out of the series table and then finding all matching podcasts out of the podcast table with that same id as the series. Also, I need to return everything from the latest series table as well as the podcast table because I will be using that data.
mysql_query("SELECT * FROM series WHERE startdate <= $now ORDER BY startdate DESC LIMIT 1;");
mysql_query("SELECT * FROM podcast WHERE pubdate <= $now AND series = $latestIdFromPreviousQuery ORDER BY pubdate DESC LIMIT 5;");
If you can't, maybe there is another way to return the series and podcasts out of the database in the latest series?
Sorry, I said I need everything from the series table, but what I meant was I need everything out of the series table for the latest series.
mysql_query("SELECT * FROM series WHERE startdate <= $now ORDER BY startdate DESC LIMIT 1;");
mysql_query("SELECT * FROM podcast WHERE pubdate <= $now AND series = $latestIdFromPreviousQuery ORDER BY pubdate DESC LIMIT 5;");
If you can't, maybe there is another way to return the series and podcasts out of the database in the latest series?
Sorry, I said I need everything from the series table, but what I meant was I need everything out of the series table for the latest series.