The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

here I go again with php & mysql =) by resc 2007-02-16 00:43:35
Been fiddling (yes, a very technical term) a bit now with this, and can't seem to wrap my head around it...

I have a bunch of events in a mysql table, users can add events and set any date they want.
I also have a function that shows these events in our forum.
Here's the deal, I'm using this php-format for dates: Y-m-d G:i
but as it is now, the events are shown based upon the autogenerated id-number of the table-row. I need them to come out sorted by date.

SQL query:
$query1 = "SELECT * FROM $dbtbl WHERE event_date >= NOW()";

What do I need to do get the sorting by another field/column?
[ Reply ]
  ORDER BY event_date; by Stormkitten2007-02-16 00:47:04
    *hides head in sand* by resc2007-02-16 00:54:34
      *Borrows resc his perculator* by EnzoMatrix2007-02-16 01:08:14
        Espresso powder... by roger G. rapid2007-02-16 01:47:32
  That depends on the field / column by EnzoMatrix2007-02-16 01:05:40
    LIKE has nothing to do with ordering by sazzer2007-02-16 01:56:44

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)