----- Forwarded message from Jens Ott <[EMAIL PROTECTED]> -----
X-Authentication-Warning: hamilton.bonn-event.de: Host
p3E9B9E42.dip.t-dialin.net [62.155.158.66] claimed
to be jens
From: Jens Ott <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: BUG in Module DBI?
Date: Sun, 15 Apr 2001 02:28:13 +0200
Hi Tim Bunce,
I found your name as the author of the perl-module DBI, that's why I'm mailing to you.
Maybe I found a bug in the modul (or maybe I'm just too stupid to use it correctly :(
!)
I tried the following:
== snip ==
my $statement = "SELECT user, session FROM benutzer WHERE session_key= ?";
my $sth = $dbh->prepare($statement) || &error('SQL', $dbh->errstr);;
my $success = $sth->execute($sk);
my ($user, $session) = $sth->fetchrow_array || &error('SQL', $sth->errstr);
== end snip ==
In that way only the scalar $user was set and contained the value of "session" from
the database.
If I take the following code evrything works like it should:
== snip ==
my $statement = "SELECT user, session_start FROM benutzer WHERE session_key= ?";
my $sth = $dbh->prepare($statement) || &error($ScriptName, 'SQL-Fehler',
$dbh->errstr);;
my $success = $sth->execute($sk);
$aref= $sth->fetchrow_arrayref || &error($ScriptName, 'SQL-Fehler', $sth->errstr);
my ($f_user, $session_start) = @$aref;
== end snip ==
Maybe you can tell me what's wrong in the first code or maybe you take this mail as a
bug-report.
Hope to hear from you
Regards
Jens Ott
PS: I ask you to excuse my bad english.
----- End forwarded message -----