or download this
if ($AtLeastOneValueToInsert == 1) {
$FinalInsertSQL = $StartInsertSQL . $InsertColumnSQL . $InsertValu
+esSQL;
if ($debug1 == 1) {print "now updating SearchResults table\n"};
...
$sth->execute() # Execute the insert
or die "Couldn't execute statement: " . $sth->errstr;
$sth->finish;