Mysql database sortup?

Discussion in 'MySQL' started by izlik, Oct 28, 2007.

  1. #1
    Hey there.

    I was wondering how i can clean up my database so the rows will be sorted by ID? so it's 1,2,3,4 etc. right now the rows are sorted totaly random like 758,1,3487,3,4 etc.

    i hope someone can help, thanks! :)
     
    izlik, Oct 28, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    how are they inserted? and what is your database type?

    if its MyISAM and you have a primary key thats auto increment, it should have done so already
     
    Lordy, Oct 29, 2007 IP
  3. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #3
    copyed one of the rows, and that is how they are inserted. the database type should be INNODB as mysql administrator said so.

     
    izlik, Oct 29, 2007 IP
  4. RaginBajin

    RaginBajin Peon

    Messages:
    87
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why are you wanting to reorder what is in your database?

    If you just want to order that information as it comes out just use DESC and ASC
     
    RaginBajin, Oct 30, 2007 IP
  5. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #5
    this is not a query for a php files i ask for, this is a query for my database to use in like phpmyadmin to sortup the database. atm i goes from 1-700 then comes 1000-2000 and then 800-999 then 2001 and so on, i want it to be in the correct nummeral order if you understand what i mean.
     
    izlik, Oct 31, 2007 IP
  6. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #6
    If you are browsing in phpmyadmin, you can click on a column heading
    and the rows will be sorted according to that column. You can also
    select the sort order during search.
     
    Kuldeep1952, Oct 31, 2007 IP