Thread Komplexere OR/ODER-Geschichten in SQL::Abstract
(4 answers)
Opened by Froschpopo at 2007-11-22 23:16 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #!/usr/bin/perl use strict; use warnings; use lib qw(./lib); use SQL::Abstract; my $sql = SQL::Abstract->new; # WHERE ( (id = ? AND user = ?) OR (birthday = ? AND gender = ?) ) my %where = ( -or => [ { id => '1', user => 'hallo', }, { birthday => '12.01.1999', gender => 'm', } ], ); my ($stmt) = $sql->select('tabelle', [qw/a b c/], \%where); print $stmt; OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ |