bump

bump

am 04.04.2007 18:06:43 von leader

I'm repeating this earlier post in case the gurus around here take the
week-end off from reading cries for help or don't look back more than
24 hours.

=========================================

I'm trying to list meteorological data reports, from an ever-varying
number of locations, in two columns, side-by-side - the first half of
the list alphabetically in the left column and then the second half in
the right column. In the example below, numbering the locations for
the purpose of the example, it has to be something like this, using,
say, 60 locations -

$Query="SELECT * FROM obervations order by location";
$Result=mysql_db_query ($DBName, $Query, $Link);
while ($Row=mysql_fetch_array ($Result))
(










$Row[location1] $Row[humidity1] $Row[oktas1] $Row[location31] $Row[humidity31] $Row[oktas31]
$Row[location2] $Row[humidity2] $Row[oktas2] $Row[location32] $Row[humidity32] $Row[oktas32]



and so on until the database is exhausted.
I've tried using arrays to store each data item but I think it's
clumsy. Is there a more elegant way to do it?
TIA.

Re: bump

am 04.04.2007 20:41:22 von Mick White

leader@congress.hotmail.com wrote:
> I'm repeating this earlier post in case the gurus around here take the
> week-end off from reading cries for help or don't look back more than
> 24 hours.
>
> =========================================

This is called a "horizontal looper", you could google it.
Mick

>
> I'm trying to list meteorological data reports, from an ever-varying
> number of locations, in two columns, side-by-side - the first half of
> the list alphabetically in the left column and then the second half in
> the right column. In the example below, numbering the locations for
> the purpose of the example, it has to be something like this, using,
> say, 60 locations -
>
> $Query="SELECT * FROM obervations order by location";
> $Result=mysql_db_query ($DBName, $Query, $Link);
> while ($Row=mysql_fetch_array ($Result))
> (
>
>


>
>
>
>
>
>
>
>
>
$Row[location1] $Row[humidity1] $Row[oktas1]$Row[location31] $Row[humidity31] $Row[oktas31]
$Row[location2] $Row[humidity2] $Row[oktas2]$Row[location32] $Row[humidity32] $Row[oktas32]

>
>
> and so on until the database is exhausted.
> I've tried using arrays to store each data item but I think it's
> clumsy. Is there a more elegant way to do it?
> TIA.