Gossamer Forum
Home : Products : Links 2.0 : Customization :

Modify 1 value in entire database?

Quote Reply
Modify 1 value in entire database?
I tried to add a mod (multiple categories) and messed it up. As a result, I now have "No" as the default for "Rating" when modifying links. This is now true for ALL records in the database. Is there any way to change this throughout the entire database easily? I have approximately 1300 links, and don't want to have to go through each and every one to manually change it.

Thanks for your help,
Chad
Quote Reply
Re: Modify 1 value in entire database? In reply to
Use the upgrade.pl file found MANY times in this forum and in the Discussion Forum written by Bobsie...which adds the delimiter and default value to your existing database.

I just posted this script for another USER this past week in the Discussion Forum.

Also, the FAQ in the Resource Center regarding adding fields to existing databases may help you.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Modify 1 value in entire database? In reply to
The way I read Chad's problem, it sounded like the DB got corrupted (and besides, I never tack new fields to the end of DB... it makes the admin screen much too un-intuitive).

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Modify 1 value in entire database? In reply to
oldmoney,

Yes...the problem is that this Chad did not add a field to his records in his existing database after adding the field in the links.def.

Also, with the upgrade.pl script, you can add fields in the middle of your database and not have to "tack" fields at the end.

Make sense now? Or would you like to argue this point some more?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Modify 1 value in entire database? In reply to
The quickest way to clean up the DB is to restore from your backup and try the mod again (you did backup, didn't you? If your db is not very active, you can probably pull a backup from the admin/backup directory). If you threw caution to the wind and don't have a backup, I would probably create a regex function to do it for me (this of course assumes you know something of regex). Barring that, you could always open in Excel, use the Data:Text to Columns feature (making sure to use your DB delimeter), global replace on the selected column, copy block into Word, use Table:Convert Table to Text (making sure to use your DB delimeter), and save as a text file.

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Modify 1 value in entire database? In reply to
oldmoney,

the upgrade.pl script Bobsie wrote automatically adds new placeholding delimiters in the database a lot faster than doing it via Excel...

But to each its own.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Modify 1 value in entire database? In reply to
Didn't know that the upgrade script was capable of adding fields anywhere... guess I should have bothered to look at it first. Wink

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)