PHP Classes

File: demo1-connection.php

Recommend this page to a friend!
  Classes of Bob Gombocki   PersistClass   demo1-connection.php   Download  
File: demo1-connection.php
Role: Example script
Content type: text/plain
Description: Creating a DB connection
Class: PersistClass
DB access wrapper & storing objects in DB tables
Author: By
Last change: added web tutorial info
Date: 13 years ago
Size: 467 bytes


Class file image Download

    for updates, documentation, tutorials


// create a database connection
$myConnection = new DbConnectionMysql();
$myConnection->connect('localhost', 'demouser', 'demopassword', 'demodatabase');

// register connection into DbConnectionPool

'Successfully connected to database';