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 11884 Oct 30, 1999, 10:42 AM
Post Re: editing field position
Alex 11743 Nov 1, 1999, 10:27 AM
Post Re: editing field position
widgetz 11755 Nov 1, 1999, 11:41 AM
Post Re: editing field position
pugdog 11751 Nov 1, 1999, 4:38 PM
Post Re: editing field position
widgetz 11745 Nov 2, 1999, 11:44 AM
Post Re: editing field position
Ground Zero 11744 Apr 3, 2000, 11:43 AM
Post Re: editing field position
pugdog 11754 Apr 3, 2000, 11:07 PM
Post Re: editing field position
pugdog 11764 Apr 4, 2000, 9:05 PM
Post Re: editing field position
Alex 11747 Apr 8, 2000, 8:50 AM
Post Re: editing field position
Ground Zero 11739 Apr 8, 2000, 3:23 PM
Post Re: editing field position
pugdog 11757 Apr 10, 2000, 8:56 PM
Post Re: editing field position
pugdog 11749 Apr 11, 2000, 9:00 AM
Post Re: editing field position
Alex 11735 Apr 17, 2000, 7:23 AM
Thread Re: editing field position
gotze 11752 Apr 17, 2000, 10:58 AM
Post Re: [gotze] editing field position
jgkiefer 11685 Dec 10, 2002, 12:26 PM