Gossamer Forum
Home : Products : Links 2.0 : Customization :

Bobsie or Alex

Quote Reply
Bobsie or Alex
I have to convert a database that has been setup with the basic fields. Using the following I can convert it and add additional fields to the end of the database.

# -------------------------------------------
$ENV{'REQUEST_METHOD'} and (print "Content-type: text/plain\n\n");
open (DB, "<links.db") or print "Unable to open links database 'links.db'. Reason: $!" and exit;
open (DBOUT, ">links2.db") or print "Unable to open output database. Make sure hits dir is chmod 777 temporairly. Reason: $!" and exit;
while (<DB> ) {
chomp;
s/NULL//g;
print DBOUT "$_&#0124; &#0124;&#0124; &#0124;&#0124; &#0124;\n";
}
close DB;
close DBOUT;
print "Added two new fields onto the end. Saved it as links2.db. Change permissions back to 755 on the hits directory.";
# ---------------------------------------------

Question: How can I convert the database and add 2 new fields to the middle and 2 new fields to the end, without altering the present information in the databse?



------------------
Joker
Concepts 2000 Online
www.concepts2000.com
tech@concepts2000.com

Subject Author Views Date
Thread Bobsie or Alex Joker 2090 Jun 30, 1999, 11:23 AM
Post Re: Bobsie or Alex
Jimz 2063 Jun 30, 1999, 4:45 PM
Post Re: Bobsie or Alex
Joker 2055 Jun 30, 1999, 5:13 PM
Post Re: Bobsie or Alex
Bobsie 2065 Jun 30, 1999, 7:20 PM
Post Re: Bobsie or Alex
ds 2061 Jun 30, 1999, 11:53 PM
Post Re: Bobsie or Alex
Joker 2056 Jul 1, 1999, 1:56 AM
Post Re: Bobsie or Alex
Jimz 2061 Jul 1, 1999, 1:48 PM
Post Re: Bobsie or Alex
Bobsie 2053 Jul 2, 1999, 12:49 PM