Search is working. But it is case sensitive
This commit is contained in:
parent
1235bfe0de
commit
e7c0716a67
12
II/DB.pm
12
II/DB.pm
@ -2,7 +2,6 @@ package II::DB;
|
||||
|
||||
use SQL::Abstract;
|
||||
use DBI;
|
||||
use Encode;
|
||||
use utf8;
|
||||
|
||||
use Data::Dumper;
|
||||
@ -340,13 +339,12 @@ sub do_search {
|
||||
my ( $self, $query ) = @_;
|
||||
my $dbh = $self->{_dbh};
|
||||
|
||||
# $query = $query;
|
||||
|
||||
print "QUERY " . $query . "\n";
|
||||
|
||||
my $q
|
||||
= "select from_user, to_user, subg, time, echo, post, hash from messages where subg like '\%$query\%' order by time";
|
||||
my $q = "select from_user, to_user, subg, time, echo, post, hash
|
||||
from messages where subg
|
||||
like '\%$query\%' COLLATE NOCASE
|
||||
order by time";
|
||||
|
||||
print "SQL: " . $q . "\n";
|
||||
my $sth = $dbh->prepare($q);
|
||||
$sth->execute();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user