Date: 07/30/02
- Next message: Rasmus Lerdorf: "Re: [PHP] Problem of characters with xml_parse"
- Previous message: Brian V Bonini: "[PHP] Sorting Output"
- In reply to: Brian V Bonini: "[PHP] Sorting Output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
How are you displaying it? Show us some code...
---John Holmes...
----- Original Message -----
From: "Brian V Bonini" <b-bonini <email protected>>
To: "PHP Lists" <php-general <email protected>>
Sent: Tuesday, July 30, 2002 11:52 AM
Subject: [PHP] Sorting Output
> I have a db with the following fields:
>
> id | month | company | title | name | role | show_company | show_title |
> show_month
>
> sql query is: "select * FROM db ORDER BY month DESC";
>
> Output gets formatted like:
>
> month
> - company
> - title
> name role
> name role
> - title
> name role
> - company
> - title
> name role
> name role
> name role
>
>
> The occurrence of the number of fields within each heading is not static.
>
> The oldest data sits at the "beginning" of the db so the order by month
desc
> sorts the output from newest to oldest. Fine so far.
>
> Now, as new data gets added to the db sometimes some of it refers to past
> months. So although the order by month clause will move the new data to
the
> correct month it will not move it into the correct heading (company) and
> sub_heading (title). I've tried using group by and using multiple fields
in
> the order by but can not get the results I'm looking for, any suggestions?
>
> -Brian
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Rasmus Lerdorf: "Re: [PHP] Problem of characters with xml_parse"
- Previous message: Brian V Bonini: "[PHP] Sorting Output"
- In reply to: Brian V Bonini: "[PHP] Sorting Output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

