< Connection Script   (Previous) Table of Contents (Next)   Structure for the Schema Viewer/Builder >

DSN's

<?php

/**
 * An array of PEAR::DB DSN strings for connecting to various DBMS's
 *
 * The $user, $pw and $db variables are set elsewhere because I use
 * this file in public presentations.
 *
 * If you are using this file for your own purposes, feel free
 * to comment out the DBMS's you don't use and to enter the
 * appropriate user names, passwords, databases, etc right here.
 *
 * @package    Portability
 * @link       http://www.analysisandsolutions.com/presentations/portability/
 * @see        connect.inc
 */

$dsns = array(
    'access'   => "odbc(access)://admin@/$dba",
    'db2'      => "odbc(db2)://$userd:$pwd@/$dbd",
    'fbsql'    => "fbsql://$user:$pw@/$db",
    'firebird' => "ibase(firebird)://$user:$pw@localhost:3050/$dbf",
    'mysql'    => "mysql://$user:$pw@/$db",
    'mysqli'   => "mysqli://$useri:$pw@localhost:3307/$db",
    'oci8'     => "oci8://$user:$pw@/$dbo",
    'pgsql'    => "pgsql://$user:$pw@localhost/$db",
    'sqlite'   => "sqlite:///$dbs?mode=0666",
    'sybase'   => "sybase://$user:$pw@$mach/$db",
    'mssql'    => "mssql://$user:$pw@/$db",
);