View Full Version : duplicate table record
04-18-2012, 06:41 PM
Hello, inside the table vid I have the records name, desc and tag, I would like to create a record named file that contains exactly what name contains, do you know how cai I do this?
I searched for 2 hours but no method worked :(
04-18-2012, 06:55 PM
What do you want to do? Is this file a field in a db table?
04-18-2012, 07:15 PM
Yes file is the record I would create, it is like name, desc and tag.
They all are inside the table vid, file must contain exactly what name contains.
04-18-2012, 07:18 PM
So it's a field or a record? If its a record, I'm not sure what you intend to do in relation to the other fields. If its a field, a simple UPDATE vid SET file=name would suffice.
04-18-2012, 09:55 PM
I don't know the exact terms of a database... In phpmyadmin you open the database and at the left there are the tables. Click on a table (vid in my case) and in "Structure" you see Field, type, collocation, extra etc.
Under Field there are what i call record of a database (name, desc and tag in my case).
I just want to duplicate one of this record or field (name) and put the copied content inside another record (file) that originaly contains nothing. file must be with the same settings of name... duplicate withou touching the original name record.
04-18-2012, 10:30 PM
Then its a field yeah. Add the field for file, and execute the update statement above to populate it with the name.
Make sure its the same datatype and size of the name as well.
04-18-2012, 10:37 PM
Thank you works :)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.