14 Aug 2007 15:51
Re: DBI:mysql does not return any value
Patrick Galbraith <patg <at> grazr.com>
2007-08-14 13:51:28 GMT
2007-08-14 13:51:28 GMT
Hi,
What do you get if you remove the 'select ... FOUND_ROWS..' ?
Patrick
Thomas Goik wrote:
> Hello;
>
> I'm on a strange problem in my script i can't resolved by myself, so i
> hope that anybody has an idea.
>
> The problem is that when i start a $dbh->prepare statement which will
> return more than X rows the result is -1. Exactly the same statement
> on mysql shell will return the result, in this case 1800 rows.
>
> is there any limitation on the rows returned in DBI:mysql?
> I connect from the machine where mysql is running
>
> The statement will search inside of 1.800.000 items of its owners and
> this are 1800 .
> The statement in the script is:
> select SQL_CALC_FOUND_ROWS itSeller from tblItems where itClosedflag=0
> GROUP BY itSeller
>
> $sth = $dbh->prepare(" $stats{$_}{where} ") || die $dbh->errstr ;
> $sth->execute();
> # is searching in the table
> print "\n" . $dbh->selectrow_array("select FOUND_ROWS()") .
(Continue reading)
RSS Feed