Wayniac Posted March 12, 2010 Share Posted March 12, 2010 Greetings everyone, I currently have my database date field "priority2" set to ORDER ASC. I also have another database field called "priority". The purpose of priority is to organize the entries into groups of importance (Ex: Current(100), Pending(200), Completed(300)). Both of these work very well. The problem is that I need to integrate them so that it all of the entries under "Current Priority" will be arranged in ASC format and so fourth. Here is my code for Priority: $query = "SELECT * FROM intheloop ORDER BY priority ASC $limit"; Here is my code for Priority 2: $query = "SELECT * FROM intheloop ORDER BY priority2 ASC $limit"; Basically I can switch the name and it will change to either one, how can I make it so that there both being used together... I await your reply, thank you so much for anything that you can offer to help push me in the right direction. Quote Link to comment Share on other sites More sharing options...
schilly Posted March 12, 2010 Share Posted March 12, 2010 $query = "SELECT * FROM intheloop ORDER BY priority ASC, priority2 ASC $limit"; Quote Link to comment Share on other sites More sharing options...
Wayniac Posted March 12, 2010 Author Share Posted March 12, 2010 Thank you so much, that worked way too easy. I was created IF statements and mocking up ways to make this work... Once again, thank you much. I checked out your website, I love the name and meaning behind it, too cool. Quote Link to comment Share on other sites More sharing options...
schilly Posted March 12, 2010 Share Posted March 12, 2010 np and thanks for checking the website =) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.