Thanks for resurrecting this. smile

I got the following reply on the ASO Forums, but I haven't tried coding it yet (since I'm not a programmer and don't know how to write queries laugh )
Quote
Airing today is quite easy - you just need to use the PHP date function. Something like:
Code
$today_day = date('j');
$today_month = date('n');
$today_year = date('Y');
should give you today's date as parts that you can then use in a query.

As for sorting by "air time", you'd need to structure your data better. The problem is that you're storing two integers (one of which determines a third value) as a string of all three values concatenated. If you had "hour" (tinyint with values 0 - 23) and "min" (tinyint with values 0 - 59) you could do "order by hour, min" and then do:
Code
if ($hour >=12)
{
$am_pm = 'pm';
$hour -= 12;
}
else
{
$am_pm = 'am';
}
To give you 12 hour clock times. Or just use the 24 hour clock.

I don't really know how to do the first part so any help would be appreciated. wink

As for the second part, I'm so used to typing in "1:30 PM" -or- "1PM" -or- "1PM/8PM" (sometimes something airs twice a day), etc, I'm not sure what to do. Perhaps some function could parse the first 1 or 2 digits (until it finds either a colon or space or letter A or letter P and sort from that? I wouldn't know how to do that, either. blush

Hopefully someone there (or here) could help a little...


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 8.1.34 / MySQL 5.7.23-23 / Apache 2.4.67
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP