tlangelani/sybase-database

There is no license information available for the latest version (v1.0.1) of this package.

A simple database package for Sybase/SAP ASE

v1.0.1 2015-07-23 13:22 UTC

This package is not auto-updated.

Last update: 2025-06-11 13:15:42 UTC


README

This package allows you to connect your PHP applications to Sybase/SAP ASE database.

This will assume you already installed PHP sybase_ct extension using Sybase client libraries or FreeTDS libraries.

Usage:

// add Sybase class to your project, you can use composer autoload as well
require 'Sybase.php';

use Tlangelani\Database\Sybase;

// initialize Sybase with credentials.
// NB: DEV_HOST must be configured in your Sybase interfaces file, or freetds conf file.
$sybase = new Sybase('DEV_HOST', 'DEV_DB', 'USER', 'PASS');

// list databases
$dbs = $sybase->getDB();

// list database tables
$tables = $sybase->getTables('live_db');

// list table columns
$columns = $sybase->getTableColumns('users');

// run query
$users = $sybase->query('SELECT * FROM users');

// run query with and return data as object
$users = $sybase->query('SELECT * FROM users', 'OBJ');