in reply to selecting mysql data on time comparision
If I understand what you want ( morning callers :), you can use the MySQL HOUR() function:
You may want to replace '12' with ? if you will be interested in other times.my $earlybirds = "SELECT foo, bar, baz FROM thedata WHERE HOUR(themoment) < 12";
The MySQL docs, under 'Reference / Functions', will repay a browse. The BETWEEN() function would be useful for generalizing this query.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: selecting mysql data on time comparision
by kwtow (Novice) on Nov 17, 2002 at 06:52 UTC |