Joseph Grogan
New Member
Hi everyone....
I bought a book about php and mysql. Its an O'reilly one......
Its good but there is this one part where instead of using this to connect to a database
its using this
So when i try us this i am getting back this in the browser
Fatal error: Class 'DB' not found in ...........
Any ideas from anyone
I bought a book about php and mysql. Its an O'reilly one......
Its good but there is this one part where instead of using this to connect to a database
PHP:
include('dbLogin.php');
// Connect
$connection = mysql_connect( $db_host, $db_username, $db_password );
if (!$connection)
{
die ("Could not connect to the database: <br />". mysql_error());
}
// Select the database
$db_select=mysql_select_db($db_database);
if (!$db_select)
{
die ("Could not select the database: <br />". mysql_error());
}
its using this
PHP:
include('db_login.php');
require_once( 'DB.php' );
$connection = DB::connect ("mysql://$db_username:$db_password@$db_host/ $db_database");
if (!$connection) { die ("Could not connect to the database: <br>". DB::errorMessage()); };
So when i try us this i am getting back this in the browser
Fatal error: Class 'DB' not found in ...........
Any ideas from anyone