Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

74 users online



order by and timestamp

order by and timestamp

Currently viewing this thread: 1 (0 members and 1 guests)


Slazareth

Slazareth

Je suis le super chevre homme!
Status: Offline!

order by and timestamp

hey, I am trying to print some entries from the database and order them by time. but a limit of 5. I am printing them just fine, but it is printing the entries and ordering them based on the month, then day, then year. I want it to print based on year, month, day... any help? here's the current code.

PHP:

<?php

$result2
=mysql_query("SELECT id, DATE_FORMAT(`date`, '%m.%d.%y') as `date`, location, state, TIME_FORMAT(`time`, '%h:%i') as `time`, price, status, ampm, city FROM shows WHERE (`date` < $currentdate) ORDER BY `date` ASC LIMIT 0,5");
?>

thanks!

___________________

--Casey Britt (casey@bshosting.com) |
BS Web Design
| BS Hosting
You can hear me sing here
http://www.audiomatch.net/usrs/slazareth.png

Sekkusu

Sekkusu

Programmer
Status: Offline!

Different fields for Year, Month, and Day as opposed to timestamp. Otherwise use date() and have PHP do the sorting.

___________________

Swastika/Sauvastika: 1 2 3 4 5 6 7 8 9

Slazareth

Slazareth

Je suis le super chevre homme!
Status: Offline!

not sure I quite understand you... can you elaborate? thanks!

___________________

--Casey Britt (casey@bshosting.com) |
BS Web Design
| BS Hosting
You can hear me sing here
http://www.audiomatch.net/usrs/slazareth.png

Slazareth

Slazareth

Je suis le super chevre homme!
Status: Offline!

please?

___________________

--Casey Britt (casey@bshosting.com) |
BS Web Design
| BS Hosting
You can hear me sing here
http://www.audiomatch.net/usrs/slazareth.png

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0073 seconds.