I can't get the database for db2,please help me
| From: | yufeiw | Date: | Sun, 15 Aug 1999 08:57:46 +0000 |
| Subject: | I can't get the database for db2,please help me | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9874@lists.php.net to get a copy of this message | ||
I made a test program, as follows
<?php
error_reporting(15);
$h = dba_open("test.db2", "c", "db2", 0666);
if(!$h)
die("cannot open db\n");
for($i=0;$i<10;$i++)
dba_replace("bate_$i", "$i", $h);
dba_optimize($h);
for($key=dba_firstkey($h);$key != false;$key=dba_nextkey($h))
echo "**".$key."**";
dba_close($h);
?>
It can run right,then I annotated "for($i=0;$i<1000;$i++) dba_replace("bate_$i",
"$i", $h);"
<?php
error_reporting(15);
$h = dba_open("test.db2", "c", "db2", 0666);
if(!$h)
die("cannot open db\n");
// for($i=0;$i<10;$i++)
// dba_replace("bate_$i", "$i", $h);
dba_optimize($h);
for($key=dba_firstkey($h);$key != false;$key=dba_nextkey($h))
echo "**".$key."**";
dba_close($h);
?>
but I can't see the database'value. Why???