my $strsth ="Select variable,value,explanation,type,options from systempreferences where variable not in (";
foreach my $syspref (keys %tabsysprefs){
$strsth .= $dbh->quote($syspref).",";
my $strsth ="Select variable,value,explanation,type,options from systempreferences where variable not in (";
foreach my $syspref (keys %tabsysprefs){
$strsth .= $dbh->quote($syspref).",";