Mysql Move a record? (Mysql/pawn Question)
#1

Hello, i am trying to make it so that i have two tables, exactly the same and i want to make it so i can move one record across the the other table... is there a way to do this through sql code or do i need to actually do this in pawn? (so, Select the row from the db, then store in variable...then delete the row from the original table and insert it into new table)..

-thanks for help
Reply
#2

I don't really get it do you want to merge two of the same rows in one? or do you want to only select one of them so it basicly limits sql to only select 1 and not 2?
Reply
#3

No, imagine ive got two tables..

Code:
//accounts table with these attributes...

ID
Username
Password
Level
Kills
Deaths


//Now another table called, Accounts2 with attributes.

ID
Username
Password
LEvel
Kills
Deaths
If i have a record in the first table.. i want to remove it from that first table.. and place it into the new table..
Reply
#4

Quote:
Originally Posted by DarrenReeder
View Post
No, imagine ive got two tables..

Code:
//accounts table with these attributes...

ID
Username
Password
Level
Kills
Deaths


//Now another table called, Accounts2 with attributes.

ID
Username
Password
LEvel
Kills
Deaths
If i have a record in the first table.. i want to remove it from that first table.. and place it into the new table..
I don't see why you ever want to do that, but anyways;
Load a row from the 1st tabel, save it all into a variable, then remove it, then save it into the 2nd tabel.
Reply
#5

Yeah i know, thats what i said in my original post...

what im asking is, is there any way to do it in SQL code? Instead of just having to do all of that?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)