I have a mysql table with about 3000 rows of data on which that I need to
perform a daily backup. Because I am on a shared hosting account I do not
have administrative rights to the database. To back it up currently I have
a script that prints each line of data to the browser delimited with pipes
using this code:
$stmt = qq { select * from 2002brochurecontest };
$sth = $dbh->prepare ($stmt);
$sth->execute ();
$count = 0;
while (my $row = $sth->fetchrow_hashref())
{
print
"$row->{id}|$row->{t}|$row->{f_name}|$row->{l_name}|$row->{w_phone}|$row->{w
_phone_ext}|$row->{division}|$row->{email}|$row
->{eclub}|$row->{country}|$row->{brochure}|$row->{purchase}",
br();
}
$sth->finish();
I take the output and print it to my browser. Then I cut and paste it into
a text file. To avoid this extra step and to learn something new, I would
like to print the data to a text file. Each day I would just overwrite the
same text file with the data, so I would not have to create a new file every
time the script runs. Can anyone point me in the right direction?
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]