PEAR:MDB2

From: Date: Thu, 23 Nov 2006 15:09:00 +0000
Subject: PEAR:MDB2
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25909@lists.php.net to get a copy of this message
Hi. I already read the documentation at http://pear.php.net/manual/en/package.database.mdb2.php and trying to work with MDB2 but have a little problem. I want to make a query settign the types of the columns so i did this (working with mssql): $mdb2 =& MDB2::factory($dsn, $options); if (PEAR::isError($mdb2)) { die($mdb2->getMessage()); } $mdb2->loadModule('Datatype'); $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC); $mdb2->setLimit(20, 10); $datatypes = array('somedate' => 'date'); $result =& $mdb2->query('SELECT somedate FROM sometable', $datatypes); // Always check that result is not an error if (PEAR::isError($result)) { die($result->getMessage()); } while (($row = $result->fetchRow())) { echo $row['somedate'] . "\n"; } $mdb2->disconnect(); But the answer is something like "MDB2 Error: not found". Is ok the code i wrote? im missing something? -- Todos los humanos profundos se deleitan en imitar a los peces voladores jugando sobre las altas crestas de las olas. Consideran que lo mejor de las cosas es su superficie, lo que hay en la epidermis, sit venia verbo. (Nietzsche)

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