RE: [PEAR] PEAR DB Error

From: Date: Mon, 23 Apr 2001 21:02:22 +0000
Subject: RE: [PEAR] PEAR DB Error
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-76@lists.php.net to get a copy of this message
On Mon, 23 Apr 2001, Chris Mulcahy wrote: > Well, the exact code I'm using is: > <? > require_once 'DB.php'; > $user = 'myuser'; > $pass = 'mypass'; > $host = 'localhost'; > $dbname = 'workout'; > > $dsn = "mysql://$user:$pass@$host/$dbname"; > > echo "About to connect!<br>$dsn<br>"; > $db = DB::connect(dsn, array("debug" => 2)); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ As Tomas said on his first email, you forgot the '$' before the $dsn variable right there. See? :) Joao -- João Prado Maia <jpm@phpbrasil.com> http://phpbrasil.com - php com um jeitinho brasileiro

« previous php.pear.general (#76) next »