Login   Register  
PHP Classes
elePHPant
Icontem

File: dbconnect.inc.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marian VASILE  >  SQL Engine  >  dbconnect.inc.php  >  Download  
File: dbconnect.inc.php
Role: Configuration script
Content type: text/plain
Description: DB connection script - needs to be place in dbcontext folder
Class: SQL Engine
Execute common database access SQL queries
Author: By
Last change: Please create dbcontext folder and place dbconnect, sqlengine and logger scripts inside. Also create a log folder and set permissions to a+r.
Date: 2006-11-30 22:18
Size: 324 bytes
 

Contents

Class file image Download
<?php

require('DB.php');
define("DB_ENGINE_MYSQL"1);

global 
$db// make $db global to make it available to SQLEngine class
$dsn "mysql://root:qwe123@localhost/sqlengine";
// $dsn = "oci8://user1:passss@sqlengine";
$db DB::connect($dsn);
if (
DB::isError($db)) { die("Cannot connect to database."); }


?>