Incorrect number rows returned by sql2xml

From: Date: Wed, 15 Sep 2004 00:04:34 +0000
Subject: Incorrect number rows returned by sql2xml
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14536@lists.php.net to get a copy of this message
Hi all. Strange problem: See the code below, and the output of this code running from the shell. The first SQL statement, return 2 rows, and the second, 10. The last number is correct, and the tweo statements must return 10. I have this problem whit a few tables, but in all other cases, the number of returned rows are equal to 1. I'm using PostGis, a Geographic extension for PostgreSQL, but, I believe that is not problem with this. The query whit standard connection (pg_connect())) run normally. I can post the database dumped. Sorry my english, and thanks in advance. Bye! ############################################################################################### jmm@sigix:/htdocs/strgerror$ cat b1.php <?php include_once("XML/sql2xml.php"); $sql2xmlclass = new xml_sql2xml("pgsql://postgres:postgres@localhost/demo2","documentroot"); $xmlstring = $sql2xmlclass->getxml("SELECT objectname FROM norte LIMIT 10;"); print $xmlstring; print "\n\n"; $xmlstring = $sql2xmlclass->getxml("SELECT * FROM norte LIMIT 10;"); print $xmlstring; ?> jmm@sigix:/htdocs/strgerror$ php b1.php <?xml version="1.0"?> <documentroot><result><row><objectname>AcDbText</objectname></row><row><objectname>AcDbLine</objectname></row></result></documentroot> <?xml version="1.0"?> <documentroot><result><row><objectname>AcDbText</objectname></row><row><objectname>AcDbLine</objectname></row></result><result><row><objectid>22093456</objectid><objectname>AcDbText</objectname><ownerid>22093048</ownerid><handle>5452</handle><layer>NORTE</layer><linetype>Continuous</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;POINT(6378720.84 6534274.532)</geom></row><row><objectid>22093464</objectid><objectname>AcDbText</objectname><ownerid>22093048</ownerid><handle>5453</handle><layer>NORTE</layer><linetype>Continuous</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;POINT(6378800.344 6534092.729)</geom></row><row><objectid>22093472</objectid><objectname>AcDbText</objectname><ownerid>22093048</ownerid><handle>5454</handle><layer>NORTE</layer><linetype>Continuous</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;POINT(6378919.905 6534238.975)</geom></row><row><objectid>22093488</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>5456</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378819.739 6534370.813,6378820.471 6534255.601)</geom></row><row><objectid>22093496</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>5457</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378805.978 6534269.911,6378819.739 6534370.813)</geom></row><row><objectid>22093504</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>5458</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378819.739 6534370.813,6378834.781 6534270.094)</geom></row><row><objectid>22093520</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>545A</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378820.471 6534255.601,6378805.978 6534269.911)</geom></row><row><objectid>22093528</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>545B</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378806.161 6534241.108,6378820.471 6534255.601)</geom></row><row><objectid>22093536</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>545C</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378821.203 6534140.389,6378806.161 6534241.108)</geom></row><row><objectid>22093544</objectid><objectname>AcDbLine</objectname><ownerid>22093048</ownerid><handle>545D</handle><layer>NORTE</layer><linetype>ByBlock</linetype><linetypescale>1</linetypescale><lineweight>-1</lineweight><text>null</text><visible>-1</visible><geom>SRID=-1;LINESTRING(6378732.87 6534255.045,6378820.471 6534255.601)</geom></row></result></documentroot> jmm@sigix:/htdocs/strgerror$ ###############################################################################################

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