SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2005
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Moving Row Up or Down

    Hey there... Is there an 'easy' way to move a row up or down within a table? So moving row 1 to row 2 etc.

    I could probably mash something together but it would be ugly and if there's already a good way of doing it then i'd rather that first.
    Turn My Text - íspuǝıɹɟ ʞooqǝɔɐɟ ɹnoʎ ǝzɐɯɐ puɐ ǝsnɟuoɔ

    Computer Game Cheats & Codes

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    there is no way at all to do it, sorry

    the reason is that rows in a table have no position or sequence
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, what you are asking is odd. You could add an OrderIndex field and sort by it to ensure they get returned in the sequence you want.

  4. #4
    SitePoint Zealot
    Join Date
    Apr 2005
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies
    Turn My Text - íspuǝıɹɟ ʞooqǝɔɐɟ ɹnoʎ ǝzɐɯɐ puɐ ǝsnɟuoɔ

    Computer Game Cheats & Codes


Bookmarks

Posting Permissions

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