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 "$_| || || |\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
# -------------------------------------------
$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 "$_| || || |\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