Jump to content

Order by Date help!


Wayniac

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.