RE: [PEAR-DEV] MDB transactions in pgsql driver

From: Date: Wed, 28 May 2003 10:37:27 +0000
Subject: RE: [PEAR-DEV] MDB transactions in pgsql driver
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16771@lists.php.net to get a copy of this message
Hi, > I don't know, it was working before. It's simple stuff I'm trying to > do. I've simplyfied the code to make it easier to debug. > <?php > include 'MDB.php'; > $db = &MDB::connect(DSN); > //$db->captureDebugOutput(TRUE); > $db->setFetchMode(MDB_FETCHMODE_ASSOC); > > $groups = $db->getAssoc('SELECT group_id, name FROM groups'); > foreach ($groups as $group_id => $groupname) { > $query = 'SELECT perm FROM permissions WHERE > section_id='.$db->getIntegerValue($section_id).' AND > group_id='.$db->getIntegerValue($group_id); > $perms = $db->queryOne($query); > $defaults["perm[$group_id]"] = empty($perms) ? 'NONE' : trim($perms); > $radio = array(); > unset($radio); > } > ?> > I'll dive into the code, see if it's easy to fix. So the errors you were receiving happend in this code fragment? > One small bug I came across in Common.php > line 255: var $fetchmode = DB_FETCHMODE_ORDERED; should be > MDB_FETCHMODE_ORDERED; thx .. fixed regards, Lukas

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