Sorting Question
Moderator: General Moderators
Sorting Question
Hello, i was woundering if anyone knows if you can sort a query twice. Because my news script sorts by date, but then the problem arises what if i post twice in a day. What i want to do is to first sort by date then by time. Is that possible within one query? Thank you.
-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
Sorting Question
Also bear in mind that you can sort on a number of fields....
If your table looked like:
ArticleID - int autonumber
ArticelText - varchar 255
PostDate - Date
PostTime - TimeStamp
......etc you could:
SELECT ArticleText
, ArticleID
.......etc
WHERE.....etc
ORDER By PostDate, PostTime
would do it also if you kept the date and time seperate...
Phil J.
If your table looked like:
ArticleID - int autonumber
ArticelText - varchar 255
PostDate - Date
PostTime - TimeStamp
......etc you could:
SELECT ArticleText
, ArticleID
.......etc
WHERE.....etc
ORDER By PostDate, PostTime
would do it also if you kept the date and time seperate...
Phil J.