mdb-tools/mdb-parser

Parser for MS Access Database files. This package is build and tested on .mdb files but can be tested with other formats

v1.0.0 2021-04-02 17:13 UTC

This package is auto-updated.

Last update: 2024-11-07 00:50:50 UTC


README

Description

If you challenged the problem with integrating you app with MS Access database, then you in correct place! This package can parse MS Access backup files ".mdb" files.

Of course there is not magic behind of this, and to make it work you need to install special utility, which is able to read .mdb files. That utility called "mdb-tools".

How it works?

There is simple idea! The package is transferring your .mdb file to mdb-tools CLI. So, when you query tables list, this package just run in CLI:

mdb-tables backup.mdb

Installation

  1. Install mdb-tools globally on your machine:
apt-get update -y
apt-get install -y mdbtools
  1. Install Composer PHP package:
composer require mdb-tools/mdb-parser

Usage

Main logic is put into class "Parser", which has corresponded Facade class. You may include the parser into your code like this:

use MDBTools\Facades\Parsers\MDBParser;

After you may do things like this:

//load you file
$parser = MDBParser::loadFile('/path/to/file');

//see table names...
$tables = $parser->tables();

//parse data from one chosen table...
print_r($parser->selectTable('some_table')->toArray());

Links