Re: [PHP] mySQL - Swap data in a field between two rows

2001-03-17 Thread Gary Huntress
I don't mean to be argumentative, but why would you need to do this? A key field is usually intended to uniquely identify a row and nothing more, the actual value of the key (whether the id is 1 or 2) *should* be immaterial. I'm probably over simplifying this, but are you sure you really need

[PHP] mySQL - Swap data in a field between two rows

2001-03-17 Thread Vincent P. Cocciolone
There must be an easy way, but it escapes me. How can I switch the data in a feild of one row with the data in that field of another row? example: row: id=1 fname=John lname=Doe row: id=2 fname=Mary lname=Poppins to: row: id=2 fname=John lname=Doe row: id=1 fname=Mary lname=Poppins Thanks...