my $key = $query->param('key'); my $type = $query->param('type'); my $_where; if ($type eq 'id') { $key =~ s/[^0-9]*//g; $_where = "cms_id=$key"; } else { $key = $dbh->quote($key); $key =~ s/\'(.*)\'/$1/; $_where = qq~cms_title LIKE "%$key%"~; } my $dbhquery = "SELECT * FROM cms where $_where"; my $sth = $dbh->prepare($dbhquery); $sth->execute() or die "$DBI::errstr"; my $cats = $sth->fetchall_arrayref({}); $sth->finish; print scalar(@$cats), " result, Eplanet Indexpage

"; foreach my $cat (@$cats) { print "

  • $cat->{'cms_title'}$_statu [ $cat->{'cms_cre_data'} ] (Build)(Edit)(Del)(ToP)
    $cat->{'cms_describe'}"; } 1;