NYCPHP Meetup

NYPHP.org

[nycphp-talk] sorting multi-dimesional arrays ...

Jon Baer jonbaer at jonbaer.net
Thu Jul 24 11:30:54 EDT 2003


the names/ssids are not unique in that it pertains to its mac address ...
another method was

"select count(ssid) where ssid = 'linksys'" looping through the names,
stuffing it into an array and then sorting.

the question still remains how to perform array_count_values, sort it, and
still be able to retain original key values (as they get indexed instead),
seems 2 arrays must be used ...

- jon

pgp key: http://www.jonbaer.net/jonbaer.asc
fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47


----- Original Message ----- 
From: "Christopher R. Merlo" <cmerlo at matcmp.ncc.edu>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Wednesday, July 23, 2003 11:58 PM
Subject: Re: [nycphp-talk] sorting multi-dimesional arrays ...


> On 2003-07-21 17:48 -0700, Jon Baer <jonbaer at jonbaer.net> wrote:
>
> | basically i have around 3500+ access points logged and wanted to do some
> | stats, but could not think of a better way to sort via a 2d array on the
2nd
> | element, im just looking to shorten up the code (by just using an array
> | method of some kind - array_multisort?)...
>
> why not just do:
>
> $sql = "select * from table order by column2";
>
> -c
>
> -- 
>   cmerlo at matcmp.ncc.edu      http://turing.matcmp.ncc.edu/~cmerlo
>
> Windows:  You'll wish we were kidding.
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>




More information about the talk mailing list