Fwd: [PHP] PEAR and MDB2
| From: | Alain Roger | Date: | Sun, 12 Nov 2006 15:49:22 +0000 |
| Subject: | Fwd: [PHP] PEAR and MDB2 | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244521@lists.php.net to get a copy of this message | ||
but the problem is before:
$mdb2 =& MDB2::connect($dsn);
if (PEAR::isError($mdb2))
{
die($mdb2->getMessage()."<br><br>".$db2->getUserinfo());
}generate a : MDB2 Error: not found connect: [Error message: extension pgsql is not compiled into PHP] ** pgsql(pgsql)://login:xxx@localhost:5432/mydbname how is it possible ? when i control the php.ini and phpinfo() i see that pgsql is install and activated. So, what did i miss ? Al. On 11/12/06, Roman Neuhauser <neuhauser@sigpipe.cz> wrote:
# raf.news@gmail.com / 2006-11-12 09:46:34 +0100: so when i have this code :-- Alain ------------------------------------ Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5$options = array('debug' => 2, 'portability' =>MDB2_PORTABILITY_ALL,);$query = 'SELECT * from sp_u_001(\'all\')'; $db2 = & new MDB2_Driver_pgsql(); $db2->connect($dsn); if (PEAR::isError($db2)) {die("Error connection : ".$db2->getMessage());} $res = $db2->exec($query); if (PEAR::isError($res)) {die("Error connection : ".$res->getMessage());} i get this error ==> "Error connection : MDB2 Error: unknown error" (from $res control) http://pear.php.net/manual/en/package.database.mdb2.intro-query.php says:exec() should be used for manipulation queries.IOW, you should use query() for SELECTS, exec() for other statements. Perhaps that's your problem? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW.Cause you weren't THERE. http://bash.org/?255991