Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: editing field position

Quote Reply
Re: editing field position In reply to
The reason I didn't suggest this method is I thought when I looked before, it writes out the table defintion, it writes out the fields in the same order. But it uses the "INSERT" statement with a fully qualified field/value pair.

So, the command would be:

mysqldump --add-drop-table -c -uUSERNAME -pPASSWORD LinksDB LinksTable > dumpfile.txt

Where LinksDB is the name of the DATABASE and the LinksTable is the name of the table you want to dump (or no table if you want to dump the whole dabase).

To dump the default values:

mysqldump --add-drop-table -c -uUSERNAME -pPASSWORD Links Links > dumpfile.txt

That would dump the Links table of the Links database into dumpfile.txt

You then rearrange the fields in he "Create" table statement -- that should be just a matter of CAREFULLY moving whole lines around. Watch the COMMAS!!

When you import the file:

mysql -uUSERNAME -pPASSWORD LinksDB < datadump.txt

It will DROP (meaning it's gone!) the old Links table, and create a new one, in the new order, and inserting the records into it.

The command above you need to make the "LinksDB" what the links database is, the "default" values would be:

mysql -uUSERNAME -pPASSWORD Links < datadump.txt

DON'T FORGET: to do a re-sync in the admin!!!

If you don't, the .def file will have the fields in the wrong order, and you will get very, very screwy errors!!!


Subject Author Views Date
Thread editing field position widgetz 16535 Oct 30, 1999, 10:42 AM
Post Re: editing field position
Alex 16267 Nov 1, 1999, 10:27 AM
Post Re: editing field position
widgetz 16277 Nov 1, 1999, 11:41 AM
Post Re: editing field position
pugdog 16274 Nov 1, 1999, 4:38 PM
Post Re: editing field position
widgetz 16274 Nov 2, 1999, 11:44 AM
Post Re: editing field position
Ground Zero 16269 Apr 3, 2000, 11:43 AM
Post Re: editing field position
pugdog 16281 Apr 3, 2000, 11:07 PM
Post Re: editing field position
pugdog 16296 Apr 4, 2000, 9:05 PM
Post Re: editing field position
Alex 16277 Apr 8, 2000, 8:50 AM
Post Re: editing field position
Ground Zero 16280 Apr 8, 2000, 3:23 PM
Post Re: editing field position
pugdog 16282 Apr 10, 2000, 8:56 PM
Post Re: editing field position
pugdog 16277 Apr 11, 2000, 9:00 AM
Post Re: editing field position
Alex 16262 Apr 17, 2000, 7:23 AM
Thread Re: editing field position
gotze 16294 Apr 17, 2000, 10:58 AM
Post Re: [gotze] editing field position
jgkiefer 16209 Dec 10, 2002, 12:26 PM