my $sth = $dbh->prepare("select .....");
$sth->execute();
my $data = $sth->fetchrow_hashref();
my $list = $data->{'Col1'};
Ilya
-----Original Message-----
From: Goodman Kristi - kgoodm [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 11:19 AM
To: '[EMAIL PROTECTED]'
Subject: New to DBI
Hello!
I am a Win32::ODBC user and I am trying to convert to DBI. However, I am
having trouble trying to figure out how to do one thing. How can you return
a hash where you can assign the values returned to a variable.
This is the code I have from using the WIN32::ODBC module and I would like
to do the same thing using DBI.
$db1->Sql("SELECT * FROM WORKREQUEST WHERE (WRID = '$wrnum' )" );
$db1->FetchRow();
%db1hash = $db1->DataHash();
$list = $db1hash{'ListID'}; #ListID is the column name
$proj = $db1hash{'ProjID'}; #ProjID is the column name
ect...
Can anyone help? Please let me know if this is not a clear explanation on
what I am trying to do.
Thanks!
Kristi
Kristi Goodman
Technical Support Specialist
AECMS, O/ITS
Acxiom Corporation , Conway Campus
**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.