Re: [PHP-DEV] PHP 4.0 Bug #4269: Limit on records added with dba_insert From: Sascha Schumann (sascha <email protected>)
Date: 04/29/00

On Fri, Apr 28, 2000 at 10:00:11AM -0000, alex.dyas <email protected> wrote:
> From: alex.dyas <email protected>
> Operating system: FreeBSD 3.3 RELEASE
> PHP version: 4.0 Beta 4 Patch Level 1
> PHP Bug Type: DBM/DBA related
> Bug description: Limit on records added with dba_insert
>
> The script below should add 500 records to the GDBM database. However, it only adds 490 and if run a second time will not add any more records. If the loop counter is increased to say 1000 then only 993 records are added, 2000 -> 1997 etc. Very odd.
>
> ** SCRIPT:
> <?
> // ** Write to database **
> $dbh = dba_open("./test.dbm","w","gdbm");
> for($x=0;$x<500;$x++)

Let this loop start at 1..

> while($key)

..or otherwise this loop might stop too early. Also make sure to
use

while($key != false)

- Sascha

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>