summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2009-01-01 16:54:45 +0000
committerAndreas Brachold <vdr07@deltab.de>2009-01-01 16:54:45 +0000
commit783289c4edc1f55b87a478cd19b2bbcc75cb5a22 (patch)
tree2fea9b52fac65c97bddeb99091d8cb22b7d6c417 /lib
parentf3fbf13880739f68242f41fc166be28f2cba8c32 (diff)
downloadxxv-783289c4edc1f55b87a478cd19b2bbcc75cb5a22.tar.gz
xxv-783289c4edc1f55b87a478cd19b2bbcc75cb5a22.tar.bz2
EPG: nx/next failed with cgrp=all
Diffstat (limited to 'lib')
-rw-r--r--lib/XXV/MODULES/EPG.pm39
1 files changed, 36 insertions, 3 deletions
diff --git a/lib/XXV/MODULES/EPG.pm b/lib/XXV/MODULES/EPG.pm
index c36b8ae..c56f250 100644
--- a/lib/XXV/MODULES/EPG.pm
+++ b/lib/XXV/MODULES/EPG.pm
@@ -1067,7 +1067,18 @@ ORDER BY c.vid, c.pos
|;
my $sthtemp = $self->{dbh}->prepare($sqltemp);
- $sthtemp->execute(ref $term eq 'ARRAY' ? @$term : $term)
+ if($term) {
+ if(ref $term eq 'ARRAY') {
+ my $x = 1;
+ foreach (@$term) {
+ $sthtemp->bind_param( $x++, $_ );
+ }
+ }
+ else {
+ $sthtemp->bind_param( 1, $term );
+ }
+ }
+ $sthtemp->execute()
or return con_err($console, sprintf("Couldn't execute query: %s.",$sthtemp->errstr));
my %f = (
@@ -1129,7 +1140,18 @@ ORDER BY c.vid, c.pos
if($limit > 0) {
# Query total count of rows
my $rsth = $self->{dbh}->prepare($sql);
- $rsth->execute(ref $term eq 'ARRAY' ? @$term : $term)
+ if($term) {
+ if(ref $term eq 'ARRAY') {
+ my $x = 1;
+ foreach (@$term) {
+ $sth->bind_param( $x++, $_ );
+ }
+ }
+ else {
+ $sth->bind_param( 1, $term );
+ }
+ }
+ $rsth->execute()
or return error sprintf("Couldn't execute query: %s.",$rsth->errstr);
$rows = $rsth->rows;
if($rows <= $limit) {
@@ -1147,7 +1169,18 @@ ORDER BY c.vid, c.pos
unless($sth) {
$sth = $self->{dbh}->prepare($sql);
- $sth->execute(ref $term eq 'ARRAY' ? @$term : $term)
+ if($term) {
+ if(ref $term eq 'ARRAY') {
+ my $x = 1;
+ foreach (@$term) {
+ $sth->bind_param( $x++, $_ );
+ }
+ }
+ else {
+ $sth->bind_param( 1, $term );
+ }
+ }
+ $sth->execute()
or return error sprintf("Couldn't execute query: %s.",$sth->errstr);
$rows = $sth->rows unless($rows);
}