on Mon, 17 Jun 2002 20:50:59 GMT, Jason Frisvold wrote: > Let DBI quote it for you.. > > $month = $dbh->quote($month); > $day = $dbh->quote($day); > $hms = $dbh->quote($hms); > $host = $dbh->quote($host); > $description = $dbh->quote($description); > > $dbh->do("INSERT INTO tb1 (month, day, hms, host, description) VALUES > ($month, $day, $hms, $host, $description)");
Or even simpler: $dbh->do("INSERT INTO tb1 (month, day, hms, host, description) VALUES (?, ?, ?, ?, ?)", undef, $month, $day, $hms, $host, $description) or die $dbh->errstr; If you have to do this many times, however, it's better to use a prepared statement that can be executed. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]