Re: Sorting a multidimensional array
| From: | Roman Neuhauser | Date: | Thu, 08 Feb 2007 13:28:49 +0000 |
| Subject: | Re: Sorting a multidimensional array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-248565@lists.php.net to get a copy of this message | ||
# buddhamagnet@gmail.com / 2007-02-08 14:08:13 +0000:
> Hi all. I am building an online events directory and as part of the system
> users can search for events by date, category etc.
>
> The logic involved in finding events that match the user-entered dates works
> like so:
>
> 1. we create a range of dates from the start and end dates specified by the
> user
> 2. we then poll the database for any events that encompass or intersect this
> range (using the start_date and end_date fields from events table).
> 3. we then find out the frequency of the event ie weekly, monthly and then
> map out its lifetime.
> 4. we then go through those dates, and for any that match a date in the user
> range, the event on that date (ie all it details, name, venue, date, start
> time etc) is added to an array.
Order in the database. SELECT ... ORDER BY.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991