Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: DBI:mysql does not return any value

From: Thomas Goik <liste(at)mi-espacio.com>
Date: Tue Aug 14 2007 - 08:16:45 EDT


Hi Yair;

>May be your perl version is old, the last working versions are 5.6 and 5.8.
>If the modules are new versions working into an old

perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) ...

This is not my case

Thanks, any other idea!

Ciao Thomas

-----Original Message-----
From: Thomas Goik [mailto:liste@mi-espacio.com] Sent: Tuesday, August 14, 2007 1:16 PM
To: perl@lists.mysql.com
Subject: DBI:mysql does not return any value

Hello;

Do you need help?X

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()") .
"\n";
            # 1800
            while($user_id = $sth->fetchrow_array()) {
            # nothing
            }

if i do so on mysql it will return the right numbers and rows.

max_allow_package = 80 MB
mysql version 5.0.32

Perl            : 5.008004    (i386-linux-thread-multi)
  OS              : linux       (2.6.15.6)
  DBI             : 1.46
  DBD::mysql      : 2.9006
  DBD::XBase      : 0.240
  DBD::Sponge     : 11.10
  DBD::Proxy      : 0.2004
  DBD::File       : 0.31
  DBD::ExampleP   : 11.12
  DBD::DBM        : 0.02
--
MySQL Perl Mailing List
For list archives: 
http://lists.mysql.com/perl
To unsubscribe:    
http://lists.mysql.com/perl?unsub=yairl@savion.huji.ac.il 



-- 
MySQL Perl Mailing List
For list archives: 
http://lists.mysql.com/perl
To unsubscribe:    
http://lists.mysql.com/perl?unsub=lists@pantek.com
Received on Tue Aug 14 08:17:11 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:15:34 EDT

Do you need more help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library