HI,

the following insert/update produced error. I m using MySQL 5.0.
$insert_sql = qq {insert into inventory (prodcode,qty,lastupdatedate,prodname,basename,vendorname,cost)
values (?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE
qty=$qty,lastupdatedate=$date,prodname=$prodname,basename=$basename,
vendorname=$vendorname,cost=$cost;};
$sth = $dbh->prepare($insert_sql) || die "prepare: $insert_sql: $DBI::errstr";
$sth->execute($prodcode,$qty,$date,$prodname,$basename,$vendor,$value)
|| die "Unable to execute query: $dbh->errstr\n";


Error:
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'abc4_93419_06888,basename=Revlon, vendorname=,cost=' at line 3 at insert-inventory-mysql.pl line 55, <INVS_FH> line 1.
Unable to execute query: DBI::db=HASH(0x864a988)->errstr


Thanks
Sam


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to