Results 1 to 16 of 16

Thread: Getting sortet result from a MySQL table. [Resolved]

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Getting sortet result from a MySQL table. [Resolved]

    Is it some neith function that I can use to get my search result sorted by date from a MySQL table? If not is the only way to store all the rows in an array, and then make a sort function?
    Last edited by NoteMe; Apr 15th, 2004 at 08:48 AM.

  2. #2

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Or maybe there is a InesertSort function in some way?

  3. #3
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Other than using "ORDER BY yourdatefield" in your SQL statement?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    DOn't play smart with me.......how the hell can I have gone through a Database class (theory) without ever heard abou that SQL statment..


    Thanks, you are some kind of life saver here....I really thought I had to write my own Quicksort function in PHP here..

    ØØ

  5. #5
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Originally posted by NoteMe
    DOn't play smart with me.......how the hell can I have gone through a Database class (theory) without ever heard abou that SQL statment..
    Bad professor?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  6. #6

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Yeah...so bad that he made a bad student...



    ANd I guess I need to use DESC or something to get it in the opposit order?

  7. #7
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    You got it.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  8. #8

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    This thread is more then resolved......thanks.

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I guess your professor forgot to give you the invite to the super secret database club too, didn't he?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Yeah he did...but I hate databases that much, that I am glad he did...is it one thing I wish I didn't have to learn, it would have been about databases....

    We have a (X)HTML, CSS, PHP, MySQL class now..and he thought that the other teacher had thought us all about SQL queryes in the Database theory class, but I guess not since I havn't hear abou this.

    He added something about MAX, SUM and something at the end of the year too, but never said how to use it. But at least I know it's there...

  11. #11
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    databases are easy.. why do you hate them so much?
    Like Archer? Check out some Sterling Archer quotes.

  12. #12

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    I think it is boring....just a buch of data....and it is slow and needs a lot of maintains. Game/Graphics progragramming on the other side, is much more fun. Wish I had more about that at school.

  13. #13
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Databases are slow? It needs a lot of maintenance? Huh? Who gave you your information?

    They're boring? Just a bunch of data? Well, everything else is just a bunch of code. That's not boring?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  14. #14

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    If you want to search for a record in a 1.000.000 records datbaseyou can't expect a frame rate of 50FPS like in a game no mather what way you are searching it....


    And you need to delete old records, update old records. Reindex, and stuff like no one cares about but the one that is doing it....

    At least in graphics programming you have something to lay your eyes on. Something that is both fun and can be beautiful. Only your imagination can stop you....

  15. #15
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    The computing world would be much different without databases. My best advice is to deal.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  16. #16

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    I am so fed up about teaching first greaders about datastructures and stuff.

    But learnng new datastructures like OCT Tree, Quad Tree AABB trees and stuff like that can be fun. As long as you use them for games...


    I know that you can't live with out databases, and there is a **** load of jobs out there where you need to know a lot about them. But I don't want that kind of job anyway. So let the people who like it get those jobs, and please let me join the 3D apartment at ATI in 4-5years...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width