28, May 2012

Swap 2 Records From Table - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Swap 2 Records From Table
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Swap 2 Records From Table  (Read 857 times)
Guest


Email
« on: Mar 23, 2007, 10:53:53 pm »

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 ..
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Mar 24, 2007, 07:37:05 am »

Swapping/changing identification records on a table is not correct. Are you sure you want to do this?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Mar 24, 2007, 02:37:25 pm »

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

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6298
Tags : swap records values exchage Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Swap 2 Records From Table
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 07:01:09 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.