[PEAR:DB] Problems with cursor

From: Date: Sun, 09 Jan 2005 23:26:58 +0000
Subject: [PEAR:DB] Problems with cursor
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16854@lists.php.net to get a copy of this message
Hello. For certain circumstances I need to query the following SQL-Statement(that works fine with phpPgAdmin) to a PostgreSQL-DB: BEGIN; DECLARE funccursor SCROLL CURSOR FOR SELECT pic_id,pic_dir FROM gallery.gallery g JOIN gallery.picture ON (g.gall_id=p.fk_gall_id) WHERE g.gall_id = ANYINTEGER AND g.gall_online AND p.pic_online ORDER BY p.pic_timestamp ASC; SELECT gallery.slideshow(ANYINTEGER,'funccursor'::refcursor); MOVE PRIOR IN funccursor; FETCH 2 IN funccursor; Query must be in ONE Transaction in order not to loose the cursor! Finally, the result should contains two rows. Trying it with this code $res = $obj_db->getAll(ABOVEQUERY); if (DB::isError($res)) die($res->getMessage()); and a following var_dump($res) tells me: int(1) In addition to that, PEAR:DB doesn't fire any error. Can anyone tell how I get this Query working with PEAR:DB? Or are there any other solutions for this problem? Thanks for your help.

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