my @out; | my @out; | ||||
my $q = sqlquery($dbh, "SELECT id FROM documents LIMIT ?,?", | |||||
my $q = sqlquery($dbh, "SELECT id FROM documents WHERE id IN (CALL get_document_by_words(?)) LIMIT ?,?", | |||||
exists $qs->{filter} ? $qs->{filter} : undef, | |||||
$qs->{pageSize} * $qs->{pageIndex}, | $qs->{pageSize} * $qs->{pageIndex}, | ||||
$qs->{pageSize}); | $qs->{pageSize}); | ||||
while(my ($id) = $q->fetchrow_array()) { | while(my ($id) = $q->fetchrow_array()) { |