I'm messing with this code so much that I can't trace it down. But I will
tell you that I get a huge number, 4698765..., when I do a $sth->rows()

I do believe the $dbh connection is still good but something is wrong with
the $sth. Which means I get no rows fetched when I am expecting.

btw, I'm using redhat 9/mysql canned installation.

Sorry to post like this but every now and then I run into this error which
causes the code to break upon the call $sth->fetchrow_array().

Thanks for following-up, I'm not trying to prove anything. Just trying to
figure out what is happening. Most likely I have a bad reference somewhere
because I'm not either passing the handler around correctly.

-thanks



> Hi,
>
> Ok, how about this. Show me an example where you can prove the database
> connection still exists, but you can't fetch rows from $sth on a
> successful
> query.. Everytime I have ever had a problem fetching rows, either the
> query
> didn't return any, or the dbconnection died.
>
> I guess this might not work with some DBs or drivers? But I have always
> just
> used my $returned_rows = $sth->execute(); with mysql DBD::mysql
> and at least in my case and situation, $returned_rows gives the number of
> rows returned by the query or 0E0 if nothing.
>
>
> Eric
>
> At 07:26 PM 10/24/03 -0700, [EMAIL PROTECTED] wrote:
>>Let's re-state the question:
>>
>>If I can test $dbh using $dbh->ping(), then what is a test for $sth after
>>the execute command? Assume we don't know if the execute is good or bad
>>for a SELECT?
>
> (250) 655 - 9513 (PST Time Zone)
>
> "Inquiry is fatal to certainty." -- Will Durant
>
>
>
>
>



-----------------------------------------
eMail solutions by 
http://www.swanmail.com

Reply via email to