Jump to content

Ham

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by Ham

  1. Why is this query sorting strictly by month only...

     

    select DATE_FORMAT(someDate, '%m/%d/%Y %H:%i:%s') as someDate from someTable order by someDate desc

     

    ... while this one sorts the dates properly (but not in the format I desire)

     

    select someDate from someTable order by someDate desc

     

     

    How do I make the first query work so that it sorts the date properly?

     

     

    Thanks,

     

     

    Ham

  2. I'm trying to return 10 rows from a table starting at a primary key id with this query:

     

    select * from table_name limit $primary_key, 10;

     

    ...but it does not work.

     

    Please show me how!

     

     

    Thanks,

     

    Ham

×
×
  • 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.