<?php
/*
http://coolpenguin.net/persistclass
for updates, documentation, tutorials
*/
require('persistclass/PersistClass.php');
// create a database connection
$myConnection = new DbConnectionMysql();
$myConnection->connect('localhost', 'demouser', 'demopassword', 'demodatabase');
// register connection into DbConnectionPool
DbConnectionPool::instance()->registerConnection($myConnection);
echo 'Successfully connected to database';
?>
|