php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6717 db.c ver 1.43 is not working properly on windows
Submitted: 2000-09-13 12:20 UTC Modified: 2000-12-04 12:15 UTC
From: helio at helio dot com dot br Assigned:
Status: Closed Package: DBM/DBA related
PHP Version: 4.0 Latest CVS (13/09/2000) OS: windows98 2nd edition
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: helio at helio dot com dot br
New email:
PHP Version: OS:

 

 [2000-09-13 12:20 UTC] helio at helio dot com dot br
1st. dbmreplace is not working 
2nd. first character of value disappears sometimes:
This my code:
<?
  echo "<br><b>dblist function</b> ".dblist();   
  //$aArray=array("1st"=>"Dbase" , "2nd"=>"Access" , "3rd"=>"Oracle" , "4th"=>"Sybase");
  $db=dbmopen("dbtest.dbm", "c") or die("Can't create database \n");
  echo "<br>Database Opened";
  // insert/replace array into database
  while (list ($key, $val) = each ($aArray)) {
     echo "<br> $key => $val //-> function returned = \n";
     if ( dbmexists($db, $key) ) {
       echo "Replace => ".dbmreplace($db, $key, $val) ;
     } else { 
       echo "Insert => ".dbminsert($db, $key, $val) ;
     }
  } 
  // listing  dbatabase  
  echo "<P> Listing Database \n";  
  $key = dbmfirstkey($db);
  while ($key) {
     echo "<br>$key = " . dbmfetch($db, $key) . "\n";
     $key = dbmnextkey($db, $key);
  }
  echo "<P> Closing Database \n";  
  dbmclose($db) or die("<br>dbmclose failled</b> \n");  

This code produces :

Database Opened
1st => Dbase //-> function returned = Insert => 0
2nd => Access //-> function returned = Insert => 0
3rd => Oracle //-> function returned = Insert => 0
4th => Sybase //-> function returned = Insert => 0

Listing Database 
1st = base3      
2nd = ccess3 
3rd = Oracle 
4th = ybasee 

Closing Database 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-29 10:27 UTC] sniper@php.net
User feedback:
--------------

Still not working with latest CVS (29.11.2000).

--Jani
 [2000-12-04 12:15 UTC] sniper@php.net
The db extension is deprecated.
Please use dba extension instead.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC