MySQL Forums
Forum List  »  Perl

Re: DBD-mysqlPP and MySQL v4.1
Posted by: A. Sylvester
Date: September 24, 2006 09:21PM

Thanks again Bill Karwin. You are right! I realized that I wasn't getting an accurate row count from a SELECT statement using $sth->rows. I went ahead and did what the documentation suggested from the link you provided. What I also realized is the "DBI->connect(DBI:mysqlPP:database..." doesn't work for me. However "DBI->connect(DBI:mysql:database..." does work. I think it just boils down to "DBD-mysqlPP" is not compatible with MySQL v4.1. I was able to retrieve results and everything using "DBD-mysql" instead. I think I'm fine now. Thanks for your help!


Bill Karwin Wrote:
-------------------------------------------------------
> > I do not have any code that checks
> > for errors after I prepare the query yet.
>
> That would seem to be the best next step.
>
> > after running the
> > PREPARE and EXECUTE statements, "$sth->rows"
> has
> > the value of 0 which is not correct.
>
> The $sth->rows method returns rows affected by the
> last INSERT/UPDATE/DELETE.
> It isn't the count of rows returned by a SELECT.
>
> See
> http://search.cpan.org/~timb/DBI-1.52/DBI.pm#rows

Options: ReplyQuote


Subject
Written By
Posted
September 22, 2006 11:43AM
September 22, 2006 11:16PM
September 23, 2006 10:42AM
September 23, 2006 12:44PM
Re: DBD-mysqlPP and MySQL v4.1
September 24, 2006 09:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.