DB package
| From: | Jerrad Anderson | Date: | Wed, 18 Jun 2003 17:47:10 +0000 |
| Subject: | DB package | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152035@lists.php.net to get a copy of this message | ||
Can someone please tell me what I'm doing wrong with this DB.php code? I can't seem to use
it to connect to a database. I can connect to the database using the conventional mysql_connect
methods but when the following code executes it blanks out all output and I have no way of telling
if it's been run. I also do not get any results back when trying to do a query.
<?php
require_once '/usr/local/lib/php/DB.php';
//require_once 'DB.php';
$user = 'root';
$pass = 'divine';
$host = 'localhost';
$db_name = 'app';
$dsn = "mysql://$user:$pass@$host/$db_name";
$db = DB::connect($dsn);
if (DB::isError($db))
{
die ($db->getMessage());
}
$db->disconnect();
echo "\nDammnittt work you fargin fool";
?>