RE: [PHP-DB] schedule events
| From: | John W. Holmes | Date: | Thu, 17 Apr 2003 00:32:14 +0000 |
| Subject: | RE: [PHP-DB] schedule events | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27128@lists.php.net to get a copy of this message | ||
> Here it comes, I am programming an online schedule, and I need to know
at
> a
> certain moment, how many events can occur, for instance, how many
tasks to
> be done at 9:00 am, with the problem that users can insert tasks
selecting
> hour and minute of start and end time, for instance, item1 takes from
8:00
> to 9:50, item 2 from 8:45 to 9:10, so at 9:00 it should return 2 items
> concurring...
SELECT * FROM table WHERE value BETWEEN start AND end
Where value is the date/time you're looking for and start and end are
datetime (or some date type) in your database.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/