Thread MySQL abfrage
(30 answers)
Opened by Gast at 2008-03-23 20:13
so hab es jetzt nocheinmal gemacht. Schaut so aus als ob ich nun ein schritt weiter bin aber es klappt leider immer noch nicht ganz. und zwar kommt jetzt bei folgendem CODE:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #!/usr/bin/perl use strict; use DBI; # Connect to the database. my $dbh = DBI->connect("dbi:mysqlPP:database=cdcol;host=localhost", "USER", "PW", {'RaiseError' => 1}); # Now retrieve data from the table. my $sth = $dbh->prepare("SELECT id, title FROM cdcol"); $sth->execute(); while (my $ref = $sth->fetchrow_arrayref()) { print "Found a row: id = $ref->[0], name = $ref->[1]\n"; } $sth->finish(); # Disconnect from the database. $dbh->disconnect(); Diese Fehlermeldung obwohl localhost und die database und benutzer und pw stimmen würden.... Code: (dl
)
1 C:\xampplite\perl\eg>perl mysql.pl |