Jump to content

How to switch/rotate records?


random1

Recommended Posts

Hi All,

 

Is there a way in MYSQL to switch or rotate records based on an index or primary key?

 

i.e.

 

PK|  Name|  Description|

-----------------------------

1      test1    desc1

2      test2    desc2

 

updates to...

 

PK|  Name|  Description|

-----------------------------

1      test2    desc2

2      test1    desc1

 

Ultimately I am looking to sort the data itself in the database with an update sequence so I have the ability to sort by Name A-Z.

Link to comment
https://forums.phpfreaks.com/topic/120180-how-to-switchrotate-records/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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