Hi!

I have a proplem using my perl code to write some data into my mysql
database. When running in consolemode anything works fine, but when
executed by the wwwserver the scripts is processed without errors,
except the data is not written into the database! Any idea how to fixit?
Thanks in advance
Sascha

PS: the code

sub generatepins {

        open (GETESTET, ">> /usr/local/httpd/sms/generated.pin");
        open (GENERIERT, "< ./pinanfrage.dat");
####db connect und write########
        my $dbh =
DBI->connect("DBI:mysql:database=prepaid;host=localhost",
                             "root", "sascha28",
                             {'RaiseError' => 1});
        while(my $reader = <GENERIERT>)
        {
        chomp($reader);
        print GETESTET "$reader\n";
        $dbh->do("INSERT INTO pins (pin, msisdn, value, knd) VALUES
($reader, 'frei', $wert, '$kunde')");
        }
# Disconnect from the database.
        $dbh->disconnect();
        close GENERIERT;
        close GETESTET;

}


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to