CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   Sorting a Multidimensional Array with PHP and usort (http://www.codingforums.com/showthread.php?t=287481)

bcarter755 02-11-2013 10:07 PM

Sorting a Multidimensional Array with PHP and usort
 
Issues with previous code. Problem solved!

Mod can delete this thread.

mlseim 02-11-2013 11:11 PM

I'm going to throw out this idea ... and realize I don't have an answer to your specific array situation. I think it would be a good idea to post your question in the MySQL section of this forum. Something in my gut tells me that most of what you're doing can actually be handled by the query itself. MySQL is way more powerful than many people give it credit for ... and someone with a lot of MySQL experience might be able to give you the definitive answer.

bcarter755 02-12-2013 02:04 AM

mlseim, thanks for the suggestion. I hadn't considered the possibility of doing some of the sorting through MySQL.

I'm going to leave this thread on here for a few days to see if anyone has any ideas to get my script working. I'd really like to figure out how to do this through PHP.

If nobody has an idea on whether/how it's possible, I'll try in the MySQL section of the forums.

Thanks again for the help everyone—I'm looking forward to hearing any suggestions for the script!

bcarter755 02-12-2013 02:53 AM

I took a different approach and figured it out.

I'm using the MySQL to get unique dates to take that factor out of the sorting equation. It's much simpler now.

Thanks!

(A Mod can delete this thread as it's no longer relevant.)


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.