Re: About PEAR::DB bug or not..?

From: Date: Mon, 01 Oct 2001 15:21:18 +0000
Subject: Re: About PEAR::DB bug or not..?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-2108@lists.php.net to get a copy of this message
"Vitaly N. Kravchenko" wrote: > > There is problem: > I want to execute querty > SET OPTION CHARACTER SET cp1251_koi8 > > DB = MySQL. > > DB.php version: > v 1.62 2001/04/19 23:56:57 cox > > Here is example of my code: > $dsn = "mysql://$user:$pass@$host/$db_name"; > $db = DB::connect($dsn); > if (DB::isError($db)) { > die ($db->getMessage()); > } > $sql = "SET OPTION CHARACTER SET cp1251_koi8"; > $res = $db->query($sql); > if (DB::isError($res)) > die ($res->getMessage()); > > with right parameters of connection ($dsn) I receive the message: > DB Error: unknown error > To get the native error message use: $res->getDebugInfo(); The getDebugInfo() method is a Pear Error method. This will explain better your problem. Tomas V.V.Cox

« previous php.pear.dev (#2108) next »