Re: MDB transactions in pgsql driver
| From: | Jeroen Houben | Date: | Mon, 02 Jun 2003 15:07:17 +0000 |
| Subject: | Re: MDB transactions in pgsql driver | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16908@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
799From: Jeroen Houben [mailto:jeroen@terena.nl] Sent: Monday, June 02, 2003 4:42 PMLukas Smith wrote:Using Mdb 1.1.3RCI I set it to "on" and one error disappeared but I still have : Notice: Undefined index: Coordinators in /usr/local/share/php/pear/MDB/pgsql.php on line 1267 Warning: pg_numrows(): supplied argument is not a valid PostgreSQL result resource in /usr/local/share/php/pear/MDB/pgsql.php on lineDo you have autofree on or off?From: Jeroen Houben [mailto:jeroen@terena.nl] Sent: Monday, June 02, 2003 2:05 PM Lukas Smith wrote:Yes. in: $groups = $db->getAssoc('SELECT group_id, name FROM groups');From: Jeroen Houben [mailto:jeroen@terena.nl] Sent: Wednesday, May 28, 2003 1:47 PMSo the errors you were receiving happend in this code fragment?
thehmm I am having trouble reproducing this error. Therefore I would like you to do the following things for me: 1) run the test suite and set autofree to true in the test_setup.php 2) run MDB_test.php?db_type=pgsql (this script is also available in
whentest dir) I can't reproduce this error using the above tests. If the errors don't occur with these tests you will have to send me a larger piece of code with which I can reproduce these errors. If the errors do occur in the tests then please send me the output.The tests ran fine. I've found the problem though. Things go wrong
I use a table with only 2 columns. I thought it was possible to use getAssoc with 2 cols, just like in DB (http://pear.php.net/manual/en/package.database.db.db- common.getassoc.php). But it either isn't or this is a bug after all. I'm pretty sure it worked in older versions of MDB.Hmm it should work with two columns .. just not with less. So when you add a third column it works? Yes. this still won't work: $db->getAssoc('SELECT group_id, name FROM groups'); but this now works: $db->getAssoc('SELECT * FROM groups'); And your tests work, untill I dropped a column from the test table.So I think it's safe to say it doesn't work when you select 2 columns or when there are only 2 columns in the table. Jeroen