It's a perl DBI question not a MySQL one but anyways...

$sth is just a statement handle and if you print it it gives you a hash ref,
so is not an error.

After preparing you should do an execute on the statement than fetch the
results. Better, use a prepare-execute-fetch all-in-one command like:

selectall_arrayref("select * from ...")
As its name says, it returns an array ref with your results.

"man DBI" will give you every detail on this however you should get familiar
with perl data types and references manipulation.

Lian Sebe, M.Sc.
Freelance Analyst-Programmer
www.programEz.net

> -----Original Message-----
> From: upscope [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 05, 2003 12:41 AM
> To: [EMAIL PROTECTED]
> Subject: Message
>
>
> I am just learning mysql and I'm trying to write a cgi to update the
> database from a form. Also just learning  Perl. I have the
> following script
> started that is called by an HTML form. I get the follwing message when I
> execute it. Where can I find the message descriptions.
>
> DBI::st=HASH(0x1b31f28)
>
> this is my script so far:
> #!c:\perl\bin\perl
>
> use DBI();
> print "Content-type:text/html\n\n";
>
> #Connect to database members.
>
> $database = "members";
> $table = "members";
>
> $dbh = DBI->connect("DBI:mysql:$database")or
> dienice("Can't connect:$DBI::errstr");
>
> $sth = $dbh->prepare("select
> membername,address,city,state,zipcode,phonenumber from members")or
> dienice("Can't prepare statement: ",$dbh->errstr);
>
> print $sth;
>
> exit;
>
> upscope
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to