memclutter / php-dbf
Some php classes for easy work with dBase databases.
Installs: 1 917
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 4
Forks: 5
Open Issues: 0
This package is not auto-updated.
Last update: 2024-11-09 19:04:39 UTC
README
Some php classes for easy work with dBase databases
usage
First, require dBase class
require 'dBase.php';
Next, create or open dbf file.
$filename = 'example.dbf'; $mode = dBase::MODE_READ_WRITE; $dBase = dBase::open($filename, $mode); //$dBase = dBase::create($filename, $mode);
For read rows use Iterator interface
foreach ($dBase as $record) { print_r($record); }
For write record use array index operation
// append new record $dBase[] = [ // column values ]; // modify exists record by index $dBase[32] = [ // new column values ];
For delete use unset operation
// delete record by index unset($dBase[0]);
Good luck!