Can you post the Statement as you are performing it in the script? I had a lot of trouble myself getting mysql to work, but I think I have it now and I hopefully can help.
Sample code from one of my DB scripts:
$query="INSERT INTO session_log VALUES(\'$curr_time\',\'$user_id\',\'$
+passwd\');";
$worked=$dbh->do($query);