Sublime directory Surf the web anonymous Pagerank Monitor


Swap 2 Records From Table

Kamrankhan
Fri 23 March 2007, 10:53 pm GMT +0100
Hi for all,

i want to swap 2 records , i have a table

IDNameAge
1John22
2Shahzad23
3Khan20

My Question :
i want to change the postion of Record 3 with Record 2 , mean the all value's of record2 & record3 swaps each others.Some one help me ..

Nikolas
Sat 24 March 2007, 07:37 am GMT +0100
Swapping/changing identification records on a table is not correct. Are you sure you want to do this?

olaf
Sat 24 March 2007, 02:37 pm GMT +0100
yes it's better not to do that, if you table is small you can read the whole table with php and then it's possible to change the position while writing the table data back to the db in a new order... but don't think about that if you table has more xxx records

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional