...

View Full Version : duplicate table record



paperino00
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 :(

Thank you!

Fou-Lu
04-18-2012, 06:55 PM
What do you want to do? Is this file a field in a db table?

paperino00
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.

Fou-Lu
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.

paperino00
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.

Fou-Lu
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.

paperino00
04-18-2012, 10:37 PM
Thank you works :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum