Hello everyone,

New to the list, and new to MySQL. Here's the problem we have put our
employment application online and are trying to insert the information into
a MySQL database. The server is RH Linux 6.1 Apache webserver for both SSL
and Non SSL using two different installs, and the latest MySQL version. Our
application has 157 fields currently. Heres the problem, on some systems the
user receives a software error and the error points to the execute line in
our script. On some systems no error at all, but on others seemingly the
same setup it will fail at the execute line. If it fails no entries are made
into the database, if no error is made then the entry is always successful.
In between the top and bottom of the subroutine call are all of our
variables from the form fields and the entries for the query for MySQL.
Since there are 314 total lines I chose not to post them here. Are there
better ways to enter that much info into the database, or are we flat doing
it wrong?

Any help is greatly appreciated.....also any more info that is needed will
be supplied up request.

Ray

Here is the top of the file

use Mysql;
use DBI;
use CGI::Carp "fatalsToBrowser";

The top of the subroutine call

sub sql {

# database information
$db="apps";
$host="127.0.0.1";
#$port="3306";
$userid="root";
$passwd="";
$connectionInfo="DBI:mysql:database=$db;$host";

# make connection to database
$dbh = DBI->connect($connectionInfo,$userid,$passwd)|| die "Not successful
connection: $!";

# prepare and execute query
$query = "INSERT INTO certtest
_____________________________________________

The bottom of the subroutine

$sth = $dbh->prepare($query) || die "Not successful prepare: $!";
$sth->execute || die "Not successful: $!";

print "Record inserted into the database";

$sth->finish;

$dbh->commit;

# disconnect from database
$dbh->disconnect();
exit;

}


---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to