The following "Seems" to work. But does anybody know how reliable this
might be? Baically, I have a multi-dimensional array and want to sort by
one column first, than another than another. Right now, I am using a
temporary table in MySQL, but want to speed things up if possible. The
command
This would work (and might still if I changed things), but the part that
calls it is in another function also.
Steve
At 02:35 PM 2/20/2003 +, you wrote:
> -Original Message-
> From: Steve Buehler [mailto:[EMAIL PROTECTED]]
> Sent: 20 February 2003 05:25
>
> Ahhhfinally did it wit
> -Original Message-
> From: Steve Buehler [mailto:[EMAIL PROTECTED]]
> Sent: 20 February 2003 05:25
>
> Ahhhfinally did it with usort. Thanks to those who gave me that
> answer. Now here is a question for that. I would like to
> re-use my "cmp"
> function without having to rewri
Ahhhfinally did it with usort. Thanks to those who gave me that
answer. Now here is a question for that. I would like to re-use my "cmp"
function without having to rewrite it each time. Can it be written so that
instead of "divname" being hard coded, that I can pass the sort field in
th
Steve,
Have you tired Usort ??
http://www.php.net/manual/en/function.usort.php
On Thursday, February 13, 2003, at 01:08 PM, Steve Buehler wrote:
PHP version 4.2.2
I sure hope that I can get somebody to help me figure this one out. I
have a multi-dimensional array that I need to sort. Here
PHP version 4.2.2
I sure hope that I can get somebody to help me figure this one out. I have
a multi-dimensional array that I need to sort. Here is the code that I
have so far:
function gettourndivs(){
GLOBAL $sea_id,$PHP_SELF;
$result=get_mysql_query("SELECT * FROM `games` WHERE sea_id = '$se
o. Thanks again.
-Original Message-
From: Michael Sims [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 7:19 PM
To: [EMAIL PROTECTED]
Cc: Erin Fry
Subject: Re: [PHP] sorting multi-dimensional array where array elements are structs
[simple class]
On Tue, 11 Feb 2003 08:27:57
On Tue, 11 Feb 2003 08:27:57 -0600, you wrote:
>Thanks for the reply. I had already tried usort previously. For some
> reason, there is no data for the array fields at all in the cmp function
> - not sure why. Does anyone know? All help is appreciated! Thanks.
Can you post a short code sampl
On Mon, 10 Feb 2003 16:23:10 -0600, you wrote:
>Hi.
>
>Im working with a multidimensional array where the data in the
>array is a class (struct). All the information is being stored correctly,
>but I need to sort each column (AA0, BA0, etc. see below)
>by the fieldNo portion of the stru
On Mon, 10 Feb 2003 16:23:10 -0600, you wrote:
>Hi.
>
>Im working with a multidimensional array where the data in the
>array is a class (struct). All the information is being stored correctly,
>but I need to sort each column (AA0, BA0, etc. see below)
>by the fieldNo portion of the struc
Hi.
Im working with a multidimensional array where the data in the array is a class
(struct). All the information is being stored correctly, but I need to sort each
column (AA0, BA0, etc. see below) by the fieldNo portion of the struct.
class fieldClass
{
var $fieldNo;
var $srcL
11 matches
Mail list logo