Groups > Novell > MySQL with Novell > Problem Resolved




After upgrade to MySQl5.024a can not use old perl script

After upgrade to MySQl5.024a can not use old perl script
Sat, 16 Sep 2006 06:11:02 GMT
NW6.5SP5
Upgrade Mysql  to Mysql5.0.24a + upgrade perl-lib from the novell-forge.

This my perl Script:
#!perl
use Mysql;
# Connecting to MySQL database
$link = Mysql->connect($mysql_server, $mysql_dbname, $mysql_user_name, 
$mysql_user_password) or die("Could not connect to MySQL database");
print "Connected to MySQL database successfully\n";
# Select a MySQL database
$link->selectdb($mysql_dbname) or die("Please make sure that a database

\"$dbname\" exists and that you have permission to read and write on
it");
print "Selected the '$mysql_dbname' database successfully\n";

 $query = "INSERT INTO customers (inout, ndate, gwdom, gwpost, gwid, 
fruseraddr, attcnt, msgsize, gwmsgid ) VALUES('$inout_t', '$ndate_t', 
'$gwdom_t', '$gwpost_t', '$gwid_t', '$fruseraddr_t', $attcnt_t, $msgsize_t, 
'$gwmsgid_t')";

 $result = $link->query($query) or die("The SQL query, '$query'
failed");

 undef ($result);

On the string:
 $query = "INSERT INTO ......

I have Error:
The SQL query, 'INSERT INTO customers (inout,  ndate, gwdom, gwpost, gwid, 
fruseraddr, attcnt, msgsize, gwmsgid ) VALUES('i', '06/09/15 21:00:04', 
'srvcd', 'srvcp', 'fill', 'smpson@www.rarer.com', 0, 4369, 
'450B147C.1CA:99:37322' )'
failed at ....

Before update - this all work..

Any help, please

Serg 

Post Reply
Problem Resolved
Sat, 16 Sep 2006 06:55:08 GMT
> $query = "INSERT INTO customers (inout, ndate, gwdom, gwpost, gwid, 
> fruseraddr, attcnt, msgsize, gwmsgid ) VALUES('$inout_t', '$ndate_t', 
> '$gwdom_t', '$gwpost_t', '$gwid_t', '$fruseraddr_t', $attcnt_t, 
> $msgsize_t, '$gwmsgid_t')";

My old Database was haved field:  "inout"
After rename this field to the: "io"  problem was resolved.

Serg

Post Reply
about | contact