Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-11-2013, 10:07 PM   PM User | #1
bcarter755
New Coder

 
Join Date: Jul 2010
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
bcarter755 is an unknown quantity at this point
Sorting a Multidimensional Array with PHP and usort

Issues with previous code. Problem solved!

Mod can delete this thread.

Last edited by bcarter755; 02-12-2013 at 02:52 AM..
bcarter755 is offline   Reply With Quote
Old 02-11-2013, 11:11 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
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.
mlseim is offline   Reply With Quote
Old 02-12-2013, 02:04 AM   PM User | #3
bcarter755
New Coder

 
Join Date: Jul 2010
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
bcarter755 is an unknown quantity at this point
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 is offline   Reply With Quote
Old 02-12-2013, 02:53 AM   PM User | #4
bcarter755
New Coder

 
Join Date: Jul 2010
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
bcarter755 is an unknown quantity at this point
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.)
bcarter755 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:24 PM.


Advertisement
Log in to turn off these ads.