sort multi dimensional array?
Posted: Sun Jul 04, 2004 12:00 pm
Hi All,
How can I do this ... I have written a script that queries one database and inserts into another...
I have 9 variables of data (out of a total of 45) i need to group and then sort by date. Once sorted I need to insert the data into my second database in the same query that inserts for all rows.... Would i use a multi dimensional array, and then do a sort for this?
database 1 (same row)
$sd1_indicator
$sd1
$sd1_date
$sd2_indicator
$sd2
$sd2_date
$sd3_indicator
$sd3
$sd3_date
I need to sort these "groups" of data by date and then place them in my new database. So after being sorted, $sd3_date might be the newest date and need to be inserted into $sd1_date in my second db..
thanks in advance!
-P
How can I do this ... I have written a script that queries one database and inserts into another...
I have 9 variables of data (out of a total of 45) i need to group and then sort by date. Once sorted I need to insert the data into my second database in the same query that inserts for all rows.... Would i use a multi dimensional array, and then do a sort for this?
database 1 (same row)
$sd1_indicator
$sd1
$sd1_date
$sd2_indicator
$sd2
$sd2_date
$sd3_indicator
$sd3
$sd3_date
I need to sort these "groups" of data by date and then place them in my new database. So after being sorted, $sd3_date might be the newest date and need to be inserted into $sd1_date in my second db..
thanks in advance!
-P