<?xml version="1.0"?>
<?xml-stylesheet 
 href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/576/bug">
    <title>PEAR Bug #576</title>
    <link>http://pear.php.net/bugs/576</link>
    <description>[Closed] sql2xml xml-resultset without values</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bugs/576"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/576/2008-03-23+17%3A07%3A01#2008-03-23+17%3A07%3A01"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/576/2004-07-11+18%3A56%3A01#2004-07-11+18%3A56%3A01"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/576/2004-05-31+18%3A54%3A44#2004-05-31+18%3A54%3A44"/>
     </rdf:Seq>
    </items>
  </channel>
    <item rdf:about="http://pear.php.net/bugs/576">
      <title>fsteinel</title>
      <link>http://pear.php.net/bugs/576</link>
      <description><![CDATA[<pre>XML_sql2xml Bug
Reported by fsteinel
2004-01-14T16:30:17-00:00
PHP: Irrelevant OS: unix Package Version: 

Description:
------------
php 4.3.1
pear 1.2.1
DB 1.5.0RC2
XML_sql2xml 0.3.1

Reproduce code:
---------------
&lt;?php
include_once (&quot;DB.php&quot;);
include_once(&quot;XML/sql2xml.php&quot;);
$db = DB::connect(&quot;pgsql://name:pass@localhost/test&quot;);
$sql2xml = new xml_sql2xml();
$sql2xml-&gt;setEncoding(&quot;ISO-8859-1&quot;,&quot;UTF-8&quot;);
$result = $db-&gt;query(&quot;select * from jonah_channels LIMIT 1&quot;);
$xmlstring = $sql2xml-&gt;getXML($result);
print_r($result);
echo &quot;---\n&quot;;
echo $xmlstring;
echo &quot;===\n&quot;;
$result = $db-&gt;query(&quot;select * from jonah_channels LIMIT 1&quot;);
$res=$result-&gt;fetchRow();
print_r($res);
?&gt;

Expected result:
----------------
db_result Object
(
    [dbh] =&gt; db_pgsql Object
        (
            [connection] =&gt; Resource id #8
            [phptype] =&gt; pgsql
            [dbsyntax] =&gt; pgsql
            [prepare_tokens] =&gt; Array
                (
                )

            [prepare_types] =&gt; Array
                (
                )

            [transaction_opcount] =&gt; 0
            [dsn] =&gt; Array
                (
                    [phptype] =&gt; pgsql
                    [dbsyntax] =&gt; pgsql
                    [username] =&gt; name
                    [password] =&gt; pass
                    [protocol] =&gt; tcp
                    [hostspec] =&gt; localhost
                    [port] =&gt; 
                    [socket] =&gt; 
                    [database] =&gt; test
                )

            [row] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [num_rows] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [affected] =&gt; 0
            [autocommit] =&gt; 1
            [fetchmode] =&gt; 1
            [_debug] =&gt; 
            [_default_error_mode] =&gt; 
            [_default_error_options] =&gt; 
            [_default_error_handler] =&gt; 
            [_error_class] =&gt; DB_Error
            [_expected_errors] =&gt; Array
                (
                )

            [features] =&gt; Array
                (
                    [prepare] =&gt; 
                    [pconnect] =&gt; 1
                    [transactions] =&gt; 1
                    [limit] =&gt; alter
                )

            [errorcode_map] =&gt; Array
                (
                )

            [type] =&gt; 
            [prepared_queries] =&gt; 
            [prepare_maxstmt] =&gt; 0
            [last_query] =&gt; select * from jonah_channels LIMIT 1
            [fetchmode_object_class] =&gt; stdClass
            [options] =&gt; Array
                (
                    [persistent] =&gt; 
                    [optimize] =&gt; performance
                    [debug] =&gt; 0
                    [seqname_format] =&gt; %s_seq
                    [autofree] =&gt; 
                )

            [dbh] =&gt; 
        )

    [result] =&gt; Resource id #11
    [row_counter] =&gt; 
    [limit_from] =&gt; 
    [limit_count] =&gt; 
    [limit_type] =&gt; alter
    [autofree] =&gt; 
    [fetchmode] =&gt; 1
    [fetchmode_object_class] =&gt; stdClass
)
---
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;root&gt;
 &lt;result&gt;
  &lt;row&gt;
   &lt;channel_id&gt;2&lt;/channel_id&gt;
   &lt;channel_name&gt;Top Stories&lt;/channel_name&gt;
   &lt;channel_type&gt;1&lt;/channel_type&gt;
   &lt;channel_desc&gt;&lt;/channel_desc&gt;
   &lt;channel_interval&gt;86400&lt;/channel_interval&gt;
   &lt;channel_url&gt;&lt;/channel_url&gt;
   &lt;channel_link&gt;http://p.moreover.com/cgi-local/page?index_topstories+rss&lt;/channel_link&gt;
   &lt;channel_img&gt;moreover.gif&lt;/channel_img&gt;
   &lt;channel_updated&gt;0&lt;/channel_updated&gt;
  &lt;/row&gt;
 &lt;/result&gt;
&lt;/root&gt;
===
Array
(
    [0] =&gt; 2
    [1] =&gt; Top Stories
    [2] =&gt; 1
    [3] =&gt; 
    [4] =&gt; 86400
    [5] =&gt; http://p.moreover.com/cgi-local/page?index_topstories+rss
    [6] =&gt; 
    [7] =&gt; moreover.gif
    [8] =&gt; 0
)

Actual result:
--------------
db_result Object
(
    [dbh] =&gt; db_pgsql Object
        (
            [connection] =&gt; Resource id #8
            [phptype] =&gt; pgsql
            [dbsyntax] =&gt; pgsql
            [prepare_tokens] =&gt; Array
                (
                )

            [prepare_types] =&gt; Array
                (
                )

            [transaction_opcount] =&gt; 0
            [dsn] =&gt; Array
                (
                    [phptype] =&gt; pgsql
                    [dbsyntax] =&gt; pgsql
                    [username] =&gt; name
                    [password] =&gt; pass
                    [protocol] =&gt; tcp
                    [hostspec] =&gt; localhost
                    [port] =&gt; 
                    [socket] =&gt; 
                    [database] =&gt; test
                )

            [row] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [num_rows] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [affected] =&gt; 0
            [autocommit] =&gt; 1
            [fetchmode] =&gt; 1
            [_debug] =&gt; 
            [_default_error_mode] =&gt; 
            [_default_error_options] =&gt; 
            [_default_error_handler] =&gt; 
            [_error_class] =&gt; DB_Error
            [_expected_errors] =&gt; Array
                (
                )

            [features] =&gt; Array
                (
                    [prepare] =&gt; 
                    [pconnect] =&gt; 1
                    [transactions] =&gt; 1
                    [limit] =&gt; alter
                )

            [errorcode_map] =&gt; Array
                (
                )

            [type] =&gt; 
            [prepared_queries] =&gt; 
            [prepare_maxstmt] =&gt; 0
            [last_query] =&gt; select * from jonah_channels LIMIT 1
            [fetchmode_object_class] =&gt; stdClass
            [options] =&gt; Array
                (
                    [persistent] =&gt; 
                    [optimize] =&gt; performance
                    [debug] =&gt; 0
                    [seqname_format] =&gt; %s_seq
                    [autofree] =&gt; 
                )

            [dbh] =&gt; 
        )

    [result] =&gt; Resource id #11
    [row_counter] =&gt; 
    [limit_from] =&gt; 
    [limit_count] =&gt; 
    [limit_type] =&gt; alter
    [autofree] =&gt; 
    [fetchmode] =&gt; 1
    [fetchmode_object_class] =&gt; stdClass
)
---
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;root&gt;&lt;result&gt;&lt;row&gt;&lt;channel_id&gt;&lt;/channel_id&gt;&lt;channel_name&gt;&lt;/channel_name&gt;&lt;channel_type&gt;&lt;/channel_type&gt;&lt;channel_desc&gt;&lt;/channel_desc&gt;&lt;channel_interval&gt;&lt;/channel_interval&gt;&lt;channel_url&gt;&lt;/channel_url&gt;&lt;channel_link&gt;&lt;/channel_link&gt;&lt;channel_img&gt;&lt;/channel_img&gt;&lt;channel_updated&gt;&lt;/channel_updated&gt;&lt;/row&gt;&lt;/result&gt;&lt;/root&gt;
===
Array
(
    [0] =&gt; 2
    [1] =&gt; Top Stories
    [2] =&gt; 1
    [3] =&gt; 
    [4] =&gt; 86400
    [5] =&gt; http://p.moreover.com/cgi-local/page?index_topstories+rss
    [6] =&gt; 
    [7] =&gt; moreover.gif
    [8] =&gt; 0
)</pre>]]></description>
      <content:encoded><![CDATA[<pre>XML_sql2xml Bug
Reported by fsteinel
2004-01-14T16:30:17-00:00
PHP: Irrelevant OS: unix Package Version: 

Description:
------------
php 4.3.1
pear 1.2.1
DB 1.5.0RC2
XML_sql2xml 0.3.1

Reproduce code:
---------------
&lt;?php
include_once (&quot;DB.php&quot;);
include_once(&quot;XML/sql2xml.php&quot;);
$db = DB::connect(&quot;pgsql://name:pass@localhost/test&quot;);
$sql2xml = new xml_sql2xml();
$sql2xml-&gt;setEncoding(&quot;ISO-8859-1&quot;,&quot;UTF-8&quot;);
$result = $db-&gt;query(&quot;select * from jonah_channels LIMIT 1&quot;);
$xmlstring = $sql2xml-&gt;getXML($result);
print_r($result);
echo &quot;---\n&quot;;
echo $xmlstring;
echo &quot;===\n&quot;;
$result = $db-&gt;query(&quot;select * from jonah_channels LIMIT 1&quot;);
$res=$result-&gt;fetchRow();
print_r($res);
?&gt;

Expected result:
----------------
db_result Object
(
    [dbh] =&gt; db_pgsql Object
        (
            [connection] =&gt; Resource id #8
            [phptype] =&gt; pgsql
            [dbsyntax] =&gt; pgsql
            [prepare_tokens] =&gt; Array
                (
                )

            [prepare_types] =&gt; Array
                (
                )

            [transaction_opcount] =&gt; 0
            [dsn] =&gt; Array
                (
                    [phptype] =&gt; pgsql
                    [dbsyntax] =&gt; pgsql
                    [username] =&gt; name
                    [password] =&gt; pass
                    [protocol] =&gt; tcp
                    [hostspec] =&gt; localhost
                    [port] =&gt; 
                    [socket] =&gt; 
                    [database] =&gt; test
                )

            [row] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [num_rows] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [affected] =&gt; 0
            [autocommit] =&gt; 1
            [fetchmode] =&gt; 1
            [_debug] =&gt; 
            [_default_error_mode] =&gt; 
            [_default_error_options] =&gt; 
            [_default_error_handler] =&gt; 
            [_error_class] =&gt; DB_Error
            [_expected_errors] =&gt; Array
                (
                )

            [features] =&gt; Array
                (
                    [prepare] =&gt; 
                    [pconnect] =&gt; 1
                    [transactions] =&gt; 1
                    [limit] =&gt; alter
                )

            [errorcode_map] =&gt; Array
                (
                )

            [type] =&gt; 
            [prepared_queries] =&gt; 
            [prepare_maxstmt] =&gt; 0
            [last_query] =&gt; select * from jonah_channels LIMIT 1
            [fetchmode_object_class] =&gt; stdClass
            [options] =&gt; Array
                (
                    [persistent] =&gt; 
                    [optimize] =&gt; performance
                    [debug] =&gt; 0
                    [seqname_format] =&gt; %s_seq
                    [autofree] =&gt; 
                )

            [dbh] =&gt; 
        )

    [result] =&gt; Resource id #11
    [row_counter] =&gt; 
    [limit_from] =&gt; 
    [limit_count] =&gt; 
    [limit_type] =&gt; alter
    [autofree] =&gt; 
    [fetchmode] =&gt; 1
    [fetchmode_object_class] =&gt; stdClass
)
---
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;root&gt;
 &lt;result&gt;
  &lt;row&gt;
   &lt;channel_id&gt;2&lt;/channel_id&gt;
   &lt;channel_name&gt;Top Stories&lt;/channel_name&gt;
   &lt;channel_type&gt;1&lt;/channel_type&gt;
   &lt;channel_desc&gt;&lt;/channel_desc&gt;
   &lt;channel_interval&gt;86400&lt;/channel_interval&gt;
   &lt;channel_url&gt;&lt;/channel_url&gt;
   &lt;channel_link&gt;http://p.moreover.com/cgi-local/page?index_topstories+rss&lt;/channel_link&gt;
   &lt;channel_img&gt;moreover.gif&lt;/channel_img&gt;
   &lt;channel_updated&gt;0&lt;/channel_updated&gt;
  &lt;/row&gt;
 &lt;/result&gt;
&lt;/root&gt;
===
Array
(
    [0] =&gt; 2
    [1] =&gt; Top Stories
    [2] =&gt; 1
    [3] =&gt; 
    [4] =&gt; 86400
    [5] =&gt; http://p.moreover.com/cgi-local/page?index_topstories+rss
    [6] =&gt; 
    [7] =&gt; moreover.gif
    [8] =&gt; 0
)

Actual result:
--------------
db_result Object
(
    [dbh] =&gt; db_pgsql Object
        (
            [connection] =&gt; Resource id #8
            [phptype] =&gt; pgsql
            [dbsyntax] =&gt; pgsql
            [prepare_tokens] =&gt; Array
                (
                )

            [prepare_types] =&gt; Array
                (
                )

            [transaction_opcount] =&gt; 0
            [dsn] =&gt; Array
                (
                    [phptype] =&gt; pgsql
                    [dbsyntax] =&gt; pgsql
                    [username] =&gt; name
                    [password] =&gt; pass
                    [protocol] =&gt; tcp
                    [hostspec] =&gt; localhost
                    [port] =&gt; 
                    [socket] =&gt; 
                    [database] =&gt; test
                )

            [row] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [num_rows] =&gt; Array
                (
                    [11] =&gt; 1
                )

            [affected] =&gt; 0
            [autocommit] =&gt; 1
            [fetchmode] =&gt; 1
            [_debug] =&gt; 
            [_default_error_mode] =&gt; 
            [_default_error_options] =&gt; 
            [_default_error_handler] =&gt; 
            [_error_class] =&gt; DB_Error
            [_expected_errors] =&gt; Array
                (
                )

            [features] =&gt; Array
                (
                    [prepare] =&gt; 
                    [pconnect] =&gt; 1
                    [transactions] =&gt; 1
                    [limit] =&gt; alter
                )

            [errorcode_map] =&gt; Array
                (
                )

            [type] =&gt; 
            [prepared_queries] =&gt; 
            [prepare_maxstmt] =&gt; 0
            [last_query] =&gt; select * from jonah_channels LIMIT 1
            [fetchmode_object_class] =&gt; stdClass
            [options] =&gt; Array
                (
                    [persistent] =&gt; 
                    [optimize] =&gt; performance
                    [debug] =&gt; 0
                    [seqname_format] =&gt; %s_seq
                    [autofree] =&gt; 
                )

            [dbh] =&gt; 
        )

    [result] =&gt; Resource id #11
    [row_counter] =&gt; 
    [limit_from] =&gt; 
    [limit_count] =&gt; 
    [limit_type] =&gt; alter
    [autofree] =&gt; 
    [fetchmode] =&gt; 1
    [fetchmode_object_class] =&gt; stdClass
)
---
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;root&gt;&lt;result&gt;&lt;row&gt;&lt;channel_id&gt;&lt;/channel_id&gt;&lt;channel_name&gt;&lt;/channel_name&gt;&lt;channel_type&gt;&lt;/channel_type&gt;&lt;channel_desc&gt;&lt;/channel_desc&gt;&lt;channel_interval&gt;&lt;/channel_interval&gt;&lt;channel_url&gt;&lt;/channel_url&gt;&lt;channel_link&gt;&lt;/channel_link&gt;&lt;channel_img&gt;&lt;/channel_img&gt;&lt;channel_updated&gt;&lt;/channel_updated&gt;&lt;/row&gt;&lt;/result&gt;&lt;/root&gt;
===
Array
(
    [0] =&gt; 2
    [1] =&gt; Top Stories
    [2] =&gt; 1
    [3] =&gt; 
    [4] =&gt; 86400
    [5] =&gt; http://p.moreover.com/cgi-local/page?index_topstories+rss
    [6] =&gt; 
    [7] =&gt; moreover.gif
    [8] =&gt; 0
)</pre>]]></content:encoded>
      <dc:date>2004-01-14T16:30:17-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/576/2008-03-23+17%3A07%3A01#2008-03-23+17%3A07%3A01">
      <title>ifeghali [2008-03-23 22:07]</title>
      <link>http://pear.php.net/bugs/576#1206310021</link>
      <description><![CDATA[<pre>This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.</pre>]]></description>
      <content:encoded><![CDATA[<pre>This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.</pre>]]></content:encoded>
      <dc:date>2008-03-23T22:07:01-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/576/2004-07-11+18%3A56%3A01#2004-07-11+18%3A56%3A01">
      <title>gurugeek [2004-07-11 22:56]</title>
      <link>http://pear.php.net/bugs/576#1089586561</link>
      <description><![CDATA[<pre>Dear Maintainer,
Your package xml_sql2xml has currently 2 open bugs. 
We urge you to take the necessary steps to solve the 
reported issues at your soonest convenience.

If the bug issue hasn’t been addressed yet you are 
kindly asked to take the necessary steps to ensure a 
prompt resolution of the problem. If you already 
addressed the reported problem feel free to change the 
bug status as soon as possible.

Regards
David Costa
PEAR Quality Assurance
pear-qa@lists.php.net</pre>]]></description>
      <content:encoded><![CDATA[<pre>Dear Maintainer,
Your package xml_sql2xml has currently 2 open bugs. 
We urge you to take the necessary steps to solve the 
reported issues at your soonest convenience.

If the bug issue hasn’t been addressed yet you are 
kindly asked to take the necessary steps to ensure a 
prompt resolution of the problem. If you already 
addressed the reported problem feel free to change the 
bug status as soon as possible.

Regards
David Costa
PEAR Quality Assurance
pear-qa@lists.php.net</pre>]]></content:encoded>
      <dc:date>2004-07-11T22:56:01-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/576/2004-05-31+18%3A54%3A44#2004-05-31+18%3A54%3A44">
      <title>jhughes@... [2004-05-31 22:54]</title>
      <link>http://pear.php.net/bugs/576#1086044084</link>
      <description><![CDATA[<pre>Hi,

I had a very similar problem to that described here. In fact, I had two scripts with, to my eyes, exactly the same code, one where $sql2xml-&gt;getxml returned the expected result tree, and one where it returned this:

&lt;root&gt;
    &lt;result /&gt;
&lt;/root&gt;

I finally noticed that I was passing two different $options arrays to DB::connect(): one contained 
'portability' =&gt; DB_PORTABILITY_ALL,',
and one didn't.

No idea why this is the case, and don't much care as I don't particularly need that option.

Hope this helps someone else.

James</pre>]]></description>
      <content:encoded><![CDATA[<pre>Hi,

I had a very similar problem to that described here. In fact, I had two scripts with, to my eyes, exactly the same code, one where $sql2xml-&gt;getxml returned the expected result tree, and one where it returned this:

&lt;root&gt;
    &lt;result /&gt;
&lt;/root&gt;

I finally noticed that I was passing two different $options arrays to DB::connect(): one contained 
'portability' =&gt; DB_PORTABILITY_ALL,',
and one didn't.

No idea why this is the case, and don't much care as I don't particularly need that option.

Hope this helps someone else.

James</pre>]]></content:encoded>
      <dc:date>2004-05-31T22:54:44-00:00</dc:date>
    </item>
</rdf:RDF>