tina4stack/tina4php-odbc

Tina4 PHP ODBC Database Driver

Maintainers

Package info

github.com/tina4stack/tina4php-odbc

pkg:composer/tina4stack/tina4php-odbc

Statistics

Installs: 38

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v2.0.3 2026-03-14 19:31 UTC

This package is auto-updated.

Last update: 2026-03-14 19:34:37 UTC


README

ODBC database driver for the Tina4 PHP framework.

Installation

composer require tina4stack/tina4php-odbc

Requirements

  • PHP >= 8.1
  • ext-odbc
  • tina4stack/tina4php-database ^2.0

Usage

// Connection format: DSN name, username, password
$DBA = new \Tina4\DataODBC("DSN_NAME", "username", "password");

// Execute queries
$DBA->exec("create table users (id integer primary key, name varchar(200))");
$DBA->commit();

// Insert with parameters
$DBA->exec("insert into users (id, name) values (?, ?)", 1, "Alice");

// Fetch records
$result = $DBA->fetch("select * from users");
$records = $result->asArray();

// Fetch with limit and offset
$result = $DBA->fetch("select * from users", 10, 0);

// Fetch single record
$record = $DBA->fetchOne("select * from users where id = 1");

// Check if table exists
$exists = $DBA->tableExists("users");

// Get database metadata
$metadata = $DBA->getDatabase();

Testing

docker compose up -d
composer test

License

MIT - see LICENSE

Our Sponsors

Sponsored with 🩵 by Code Infinity

Code Infinity

Supporting open source communities • Innovate • Code • Empower