Thread MySQL Abfrage (26 answers)
Opened by Tom at 2004-03-26 17:13

renee
 2004-03-27 21:54
#31916 #31916
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Abfragen für mehrere Tabellen kannst Du z.B. so machen:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
my @tables = qw(table1 table2 table3 table4);

foreach(@tables){
my $select = "SELECT * FROM $_ $where ORDER BY time;";
my $sth = $dbh->prepare($select);
$sth->execute();
while(my @array = $sth->fetchrow_array()){
print "@array";
}
}
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/

View full thread MySQL Abfrage