Cache:DB skipping first row in MySQL result

From: Date: Mon, 28 Apr 2003 16:53:48 +0000
Subject: Cache:DB skipping first row in MySQL result
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5104@lists.php.net to get a copy of this message
Has anyone encountered this with PEAR:Cache 1.5.3 ? Looping over the result set is skipping the first result in a MySQL query. I am using PHP 4.3.1, Cache 1.5.3, and my code is fairly straight forward: require 'Cache/DB.php'; $age = (3*3600); $cache = new Cache_DB('file',array('cache_dir' => '/tmp/','filename_prefix' => 'query_'),$age); $cache->connect('mysql://root:password@192.168.100.2/table'); $sql = "SELECT uname FROM users WHERE lasthit > (NOW() - INTERVAL 1 DAY)"; $sth = $cache->query($sql); while($row = $sth->fetchRow(DB_FETCHMODE_ASSOC)){ extract($row); print "User is $user<br>"; } Best Regards, Brian Busche President Rendition Multimedia 500 W. Central Road Suite 208 Mount Prospect, IL., 60056 brian@archconsltd.com

« previous php.pear.general (#5104) next »