<?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/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=DB_DataObject</link>
    <description>Search Results</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/bug/21150" />
      <rdf:li rdf:resource="http://pear.php.net/bug/20947" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19924" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19923" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19642" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19500" />
      <rdf:li rdf:resource="http://pear.php.net/bug/19211" />
      <rdf:li rdf:resource="http://pear.php.net/bug/18146" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16708" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14794" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13934" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13843" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13656" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12694" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11081" />
      <rdf:li rdf:resource="http://pear.php.net/bug/10858" />
      <rdf:li rdf:resource="http://pear.php.net/bug/10326" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9949" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9910" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9793" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9076" />
      <rdf:li rdf:resource="http://pear.php.net/bug/6202" />
      <rdf:li rdf:resource="http://pear.php.net/bug/5790" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/21150">
      <title>DB_DataObject: Bug 21150 [Open] Please sign the source package</title>
      <link>http://pear.php.net/bugs/21150</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by rajasekhar
2016-11-26T16:24:14+00:00
PHP: Irrelevant OS: Debian Package Version: 1.11.5

Description:
------------
Hello Team,

Please sign the package using PGP keys, so that no third party has the code modified agaisnt your wishes after a release. Thank you.
Reference for OpenPGP best practices:
https://help.riseup.net/en/security/message-security/openpgp/best-practices. https://mikegerwitz.com/papers/git-horror-story.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by rajasekhar
2016-11-26T16:24:14+00:00
PHP: Irrelevant OS: Debian Package Version: 1.11.5

Description:
------------
Hello Team,

Please sign the package using PGP keys, so that no third party has the code modified agaisnt your wishes after a release. Thank you.
Reference for OpenPGP best practices:
https://help.riseup.net/en/security/message-security/openpgp/best-practices. https://mikegerwitz.com/papers/git-horror-story.</pre>]]></description>
      <dc:date>2016-11-26T16:24:14+00:00</dc:date>
      <dc:creator>rajasekhar &amp;#x61;&amp;#116; swecha &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/20947">
      <title>DB_DataObject: Bug 20947 [Open] _pgFieldFlags fails in postgres 9.4 with multiple schemas (fix included)</title>
      <link>http://pear.php.net/bugs/20947</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by pyrliu
2015-09-11T15:39:44+00:00
PHP: 5.5.29 OS: Linux Package Version: 

Description:
------------
I use DB_DataObject and the generator produced wrong sequence keys + 
multiple flags + wrong flags for fields. Debugged and noticed that the 
$tableWhere query in _pgFieldFlags was missing a join with pg_type:

//code producing wrong result
$tableWhere = &quot;tab.relname = '$table' AND tab.relnamespace = nsp.oid AND 
nsp.nspname = '$schema'&quot;;

//code producing correct result
$tableWhere = &quot;tab.relname = '$table' AND tab.relnamespace = nsp.oid AND 
nsp.nspname = '$schema' AND typ.typnamespace = nsp.oid&quot;;

My setup is Postgres 9.4 with 30+ schemas. The actual result was that it 
included all flags that came when the query is run without the 'AND 
typ.typnamespace = nsp.oid' join.

Just FYI about this fix for those who experience this problem. I have 
everything working now as I am overloading the DB_DataObject generator 
and have implemented my own fixes.

Expected result:
----------------
//id
'not_null default_nextval%28SCHEMA.SEQUENCE%29 primary_key'
//no flags
''
//unique not null field
'not_null unique'

Actual result:
--------------
//id
'not_null default_nextval%28SCHEMA.SEQUENCE%29 primary_key 
primary_key primary_key primary_key primary_key primary_key 
primary_key primary_key'
//no flags
'unique'
//unique not null field
'not_null unique unique unique unique unique unique unique unique'</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by pyrliu
2015-09-11T15:39:44+00:00
PHP: 5.5.29 OS: Linux Package Version: 

Description:
------------
I use DB_DataObject and the generator produced wrong sequence keys + 
multiple flags + wrong flags for fields. Debugged and noticed that the 
$tableWhere query in _pgFieldFlags was missing a join with pg_type:

//code producing wrong result
$tableWhere = &quot;tab.relname = '$table' AND tab.relnamespace = nsp.oid AND 
nsp.nspname = '$schema'&quot;;

//code producing correct result
$tableWhere = &quot;tab.relname = '$table' AND tab.relnamespace = nsp.oid AND 
nsp.nspname = '$schema' AND typ.typnamespace = nsp.oid&quot;;

My setup is Postgres 9.4 with 30+ schemas. The actual result was that it 
included all flags that came when the query is run without the 'AND 
typ.typnamespace = nsp.oid' join.

Just FYI about this fix for those who experience this problem. I have 
everything working now as I am overloading the DB_DataObject generator 
and have implemented my own fixes.

Expected result:
----------------
//id
'not_null default_nextval%28SCHEMA.SEQUENCE%29 primary_key'
//no flags
''
//unique not null field
'not_null unique'

Actual result:
--------------
//id
'not_null default_nextval%28SCHEMA.SEQUENCE%29 primary_key 
primary_key primary_key primary_key primary_key primary_key 
primary_key primary_key'
//no flags
'unique'
//unique not null field
'not_null unique unique unique unique unique unique unique unique'</pre>]]></description>
      <dc:date>2018-07-20T18:15:20+00:00</dc:date>
      <dc:creator>pyry &amp;#x61;&amp;#116; imaginer &amp;#x64;&amp;#111;&amp;#x74; fi</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19924">
      <title>DB_DataObject: Bug 19924 [Open] find() - LIMIT part is not showing in the query debug output when using MDB2</title>
      <link>http://pear.php.net/bugs/19924</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by shankao
2013-04-30T14:18:06+00:00
PHP: 5.4.9 OS: Ubuntu Package Version: 1.11.2

Description:
------------
Adding a limit() to a find() query with MDB2. In the debug 
output, the LIMIT part does not appear, even if it seems 
to be done by MDB2 correctly.

This patch fixes the problem, although adds the LIMIT 
clause to the actual query manually and it could be different 
with other DBMS (tested on MySQL) and give problems on 
that case. Note that the $sql variable is updated if the 
PEAR::DB engine is used instead.

Index: DB/DataObject.php
======================================
=============================
--- DB/DataObject.php	(revision 330166)
+++ DB/DataObject.php	(working copy)
@@ -444,6 +444,8 @@
             /* theoretically MDB2! */
             if (isset($this-&gt;_query['limit_start']) &amp;&amp; 
strlen($this-&gt;_query['limit_start'] . $this-
&gt;_query['limit_count'])) {
 	            $DB-&gt;setLimit($this-
&gt;_query['limit_count'],$this-&gt;_query['limit_start']);
+			$sql .= ' LIMIT '.$this-
&gt;_query['limit_count'];
+			$sql .= $this-&gt;_query['limit_start']? 
','.$this-&gt;_query['limit_start'] : '';
 	        }
         }

Test script:
---------------
Something like this should do it:

$a = new DB_DataObject;
$a-&gt;limit(1);
$a-&gt;find();

Expected result:
----------------
In the debug output, the query should show a &quot;LIMIT 1&quot; part

Actual result:
--------------
The LIMIT part does not appear.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by shankao
2013-04-30T14:18:06+00:00
PHP: 5.4.9 OS: Ubuntu Package Version: 1.11.2

Description:
------------
Adding a limit() to a find() query with MDB2. In the debug 
output, the LIMIT part does not appear, even if it seems 
to be done by MDB2 correctly.

This patch fixes the problem, although adds the LIMIT 
clause to the actual query manually and it could be different 
with other DBMS (tested on MySQL) and give problems on 
that case. Note that the $sql variable is updated if the 
PEAR::DB engine is used instead.

Index: DB/DataObject.php
======================================
=============================
--- DB/DataObject.php	(revision 330166)
+++ DB/DataObject.php	(working copy)
@@ -444,6 +444,8 @@
             /* theoretically MDB2! */
             if (isset($this-&gt;_query['limit_start']) &amp;&amp; 
strlen($this-&gt;_query['limit_start'] . $this-
&gt;_query['limit_count'])) {
 	            $DB-&gt;setLimit($this-
&gt;_query['limit_count'],$this-&gt;_query['limit_start']);
+			$sql .= ' LIMIT '.$this-
&gt;_query['limit_count'];
+			$sql .= $this-&gt;_query['limit_start']? 
','.$this-&gt;_query['limit_start'] : '';
 	        }
         }

Test script:
---------------
Something like this should do it:

$a = new DB_DataObject;
$a-&gt;limit(1);
$a-&gt;find();

Expected result:
----------------
In the debug output, the query should show a &quot;LIMIT 1&quot; part

Actual result:
--------------
The LIMIT part does not appear.</pre>]]></description>
      <dc:date>2013-04-30T14:18:06+00:00</dc:date>
      <dc:creator>shankao &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19923">
      <title>DB_DataObject: Bug 19923 [Open] Last error bug DB_DataObject MDB2</title>
      <link>http://pear.php.net/bugs/19923</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by yourchoice
2013-04-29T22:07:20+00:00
PHP: 5.4.14 OS: Win 8 - Apache 2.4 Package Version: 1.11.2

Description:
------------
$daoError = PEAR::getStaticProperty('DB_DataObject','lastError');

//$daoError  is null if an error in query exists

Expected result:
----------------
echo $daoError-&gt;getMessage(); to track the error 

Actual result:
--------------
null</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by yourchoice
2013-04-29T22:07:20+00:00
PHP: 5.4.14 OS: Win 8 - Apache 2.4 Package Version: 1.11.2

Description:
------------
$daoError = PEAR::getStaticProperty('DB_DataObject','lastError');

//$daoError  is null if an error in query exists

Expected result:
----------------
echo $daoError-&gt;getMessage(); to track the error 

Actual result:
--------------
null</pre>]]></description>
      <dc:date>2013-04-29T22:12:57+00:00</dc:date>
      <dc:creator>colotin_f &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19642">
      <title>DB_DataObject: Feature/Change Request 19642 [Open] Generator-comments is urlencode()ed if using pgsql</title>
      <link>http://pear.php.net/bugs/19642</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by madsliejensen
2012-10-08T10:05:54+00:00
PHP: Irrelevant OS:  Package Version: 1.10.0

Description:
------------
The Generator.php adds a comment to each field, indicating 
thing like the type and default value.

However, the postgresql-driver for DB is rawurlencode()ing 
these flags. So if the default value of a field is 'now()' it will be 
displayed as 'now%28%29' in the comments.

This is not to be fixed in the pgsql-driver (see bug #19641 
https://pear.php.net/bugs/bug.php?id=19641 )

But could it be fixed in Generator.php, so that it will output 
data that is easier to read? (by adding a urldecode() to the 
comments before adding them)</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by madsliejensen
2012-10-08T10:05:54+00:00
PHP: Irrelevant OS:  Package Version: 1.10.0

Description:
------------
The Generator.php adds a comment to each field, indicating 
thing like the type and default value.

However, the postgresql-driver for DB is rawurlencode()ing 
these flags. So if the default value of a field is 'now()' it will be 
displayed as 'now%28%29' in the comments.

This is not to be fixed in the pgsql-driver (see bug #19641 
https://pear.php.net/bugs/bug.php?id=19641 )

But could it be fixed in Generator.php, so that it will output 
data that is easier to read? (by adding a urldecode() to the 
comments before adding them)</pre>]]></description>
      <dc:date>2012-10-08T10:05:54+00:00</dc:date>
      <dc:creator>php &amp;#x61;&amp;#116; gartneriet &amp;#x64;&amp;#111;&amp;#x74; dk</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19500">
      <title>DB_DataObject: Feature/Change Request 19500 [Open] Add support for mssql in DB_DataObject_Cast</title>
      <link>http://pear.php.net/bugs/19500</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by raziel057
2012-07-10T14:19:23+00:00
PHP: 5.3.14 OS: N/A Package Version: 1.10.0

Description:
------------
Hello,

Could you add the following code in the DB_DataObject_Cast class (to support mssql) ?

Please add following line in function toStringFromBlob($to,$db):
case 'mssql':
        return mssql_escape($this-&gt;value);

Please add following line in function toStringFromString($to,$db):
case 'mssql':
        return &quot;'&quot;.$this-&gt;value.&quot;'&quot;;

And add this function at the end of file:

function mssql_escape($data) {
    if(is_numeric($data))
        return $data;
    $unpacked = unpack('H*hex', $data);
    return '0x' . $unpacked['hex'];
}

I used the following thread to find the best proposed solution to escape blob for SQL Server.
http://www.mehrdust.com/archives/insert-blob-into-mssql-using-php
http://stackoverflow.com/questions/574805/how-to-escape-strings-in-mssql-using-php

Thanks</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by raziel057
2012-07-10T14:19:23+00:00
PHP: 5.3.14 OS: N/A Package Version: 1.10.0

Description:
------------
Hello,

Could you add the following code in the DB_DataObject_Cast class (to support mssql) ?

Please add following line in function toStringFromBlob($to,$db):
case 'mssql':
        return mssql_escape($this-&gt;value);

Please add following line in function toStringFromString($to,$db):
case 'mssql':
        return &quot;'&quot;.$this-&gt;value.&quot;'&quot;;

And add this function at the end of file:

function mssql_escape($data) {
    if(is_numeric($data))
        return $data;
    $unpacked = unpack('H*hex', $data);
    return '0x' . $unpacked['hex'];
}

I used the following thread to find the best proposed solution to escape blob for SQL Server.
http://www.mehrdust.com/archives/insert-blob-into-mssql-using-php
http://stackoverflow.com/questions/574805/how-to-escape-strings-in-mssql-using-php

Thanks</pre>]]></description>
      <dc:date>2012-07-12T09:09:28+00:00</dc:date>
      <dc:creator>lallement &amp;#x61;&amp;#116; pt-consulting &amp;#x64;&amp;#111;&amp;#x74; lu</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/19211">
      <title>DB_DataObject: Bug 19211 [Open] rework unit tests</title>
      <link>http://pear.php.net/bugs/19211</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by danielc
2012-01-10T00:32:32+00:00
PHP: 5_4 SVN-2012-01-09 OS:  Package Version: SVN

Description:
------------
Hi Alan:

The unit tests need to work out of the box, please.

1) Restructure the file layout to be under a directory named &quot;DB&quot;.  This way calling the unit tests from the package checkout's root directory will work when the tests, or other files, make include calls.

2) The configurations need to be automatic.  Right now an .ini file is used.  The tests need to set path based settings based on the current directory and pick up auth information via the MYSQL_TEST_* environment variables.  See http://svn.php.net/viewvc/pear/packages/Auth_PrefManager/trunk/tests/setup.php?view=markup for an example of using those variables.

Thanks.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by danielc
2012-01-10T00:32:32+00:00
PHP: 5_4 SVN-2012-01-09 OS:  Package Version: SVN

Description:
------------
Hi Alan:

The unit tests need to work out of the box, please.

1) Restructure the file layout to be under a directory named &quot;DB&quot;.  This way calling the unit tests from the package checkout's root directory will work when the tests, or other files, make include calls.

2) The configurations need to be automatic.  Right now an .ini file is used.  The tests need to set path based settings based on the current directory and pick up auth information via the MYSQL_TEST_* environment variables.  See http://svn.php.net/viewvc/pear/packages/Auth_PrefManager/trunk/tests/setup.php?view=markup for an example of using those variables.

Thanks.</pre>]]></description>
      <dc:date>2012-01-15T11:34:41+00:00</dc:date>
      <dc:creator>danielc &amp;#x61;&amp;#116; analysisandsolutions &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/18146">
      <title>DB_DataObject: Feature/Change Request 18146 [Open] createTable.php throws MDB2 Error: not supported&quot; code=-6</title>
      <link>http://pear.php.net/bugs/18146</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by geocrunch
2010-12-27T08:45:22+00:00
PHP: 5.1.6 OS: CentOS Package Version: 1.9.5

Description:
------------
after creating .ini file and running php createTables.php /path-to-ini-file, it 
creates the required objects for each database, but in the process I 
receive a lot of error messages from MDB2:
 DB_DataObject_Generator   : ERROR       : Error reading tableInfo, 
[mdb2_error: message=&quot;MDB2 Error: not supported&quot; code=-6 mode=return 
level=notice prefix=&quot;&quot; info=&quot;_mapNativeDatatype: [Error message: 
unknown database attribute type: name]


 I have the following pear packages installed to run the script:
DB_DataObject     1.9.5   stable
MDB2              2.4.1   stable
MDB2_Driver_mysql 1.4.1   stable
MDB2_Driver_pgsql 1.4.1   stable

I am using PostgreSQL as my database

Test script:
---------------
Here is the ini test file:

[DB_DataObject]

database          = pgsql://myusername:mypassword@localhost/test_db
schema_location   = /path-to/test_db_objects
class_location    = /path-to/test_db_objects
require_prefix    = DataObjects/
class_prefix      = DataObjects_
db_driver         = MDB2 #Use this if you wish to use MDB2 as the driver
quote_identifiers = 1

The test database is very simple with only 1 table with 3 fields of type integer.
 The code seems to produce the required tables, but throws some kind of MDB2 data type errors (3 errors total in this example)</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by geocrunch
2010-12-27T08:45:22+00:00
PHP: 5.1.6 OS: CentOS Package Version: 1.9.5

Description:
------------
after creating .ini file and running php createTables.php /path-to-ini-file, it 
creates the required objects for each database, but in the process I 
receive a lot of error messages from MDB2:
 DB_DataObject_Generator   : ERROR       : Error reading tableInfo, 
[mdb2_error: message=&quot;MDB2 Error: not supported&quot; code=-6 mode=return 
level=notice prefix=&quot;&quot; info=&quot;_mapNativeDatatype: [Error message: 
unknown database attribute type: name]


 I have the following pear packages installed to run the script:
DB_DataObject     1.9.5   stable
MDB2              2.4.1   stable
MDB2_Driver_mysql 1.4.1   stable
MDB2_Driver_pgsql 1.4.1   stable

I am using PostgreSQL as my database

Test script:
---------------
Here is the ini test file:

[DB_DataObject]

database          = pgsql://myusername:mypassword@localhost/test_db
schema_location   = /path-to/test_db_objects
class_location    = /path-to/test_db_objects
require_prefix    = DataObjects/
class_prefix      = DataObjects_
db_driver         = MDB2 #Use this if you wish to use MDB2 as the driver
quote_identifiers = 1

The test database is very simple with only 1 table with 3 fields of type integer.
 The code seems to produce the required tables, but throws some kind of MDB2 data type errors (3 errors total in this example)</pre>]]></description>
      <dc:date>2010-12-28T08:06:20+00:00</dc:date>
      <dc:creator>techexpert01 &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16708">
      <title>DB_DataObject: Documentation Problem 16708 [Open] SequenceKey() Required When Not Using INI</title>
      <link>http://pear.php.net/bugs/16708</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by mabgfounder
2009-10-18T03:51:31+00:00
PHP: 5.3.0 OS: Windows XP Package Version: 1.8.12

Description:
------------
First off - thanks for maintaining what appears to be a nice db object library. When working from INI files it was easy to get started and worked right out of the box.

However, when I tried to make classes from scratch, using the docs as a guide, I did not realize that sequenceKey() existed nor how critical it was for things to work correctly.

BTW: These are the docs I was using:
http://pear.php.net/manual/en/package.database.db-dataobject.intro-autobuilding.php

I had no reason for the application's account on mysql to be able to create tables (that I knew of) so I did not grant those permissions. Inserts started failing because of an inability to create {tablename}_seq.

I did eventually figure out that a missing sequenceKey() implementation was the problem, and after some experimentation appear to have figured out how to correctly implement it. However, a lot of time would have been saved at it been in the documentation.

Thanks again for all of your time and help. This seems to be a really great library.

Test script:
---------------
You should be able to use the example on the page I listed with a mysql database where the user does not have table create permissions granted.

Expected result:
----------------
Inserts and updates will fail</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by mabgfounder
2009-10-18T03:51:31+00:00
PHP: 5.3.0 OS: Windows XP Package Version: 1.8.12

Description:
------------
First off - thanks for maintaining what appears to be a nice db object library. When working from INI files it was easy to get started and worked right out of the box.

However, when I tried to make classes from scratch, using the docs as a guide, I did not realize that sequenceKey() existed nor how critical it was for things to work correctly.

BTW: These are the docs I was using:
http://pear.php.net/manual/en/package.database.db-dataobject.intro-autobuilding.php

I had no reason for the application's account on mysql to be able to create tables (that I knew of) so I did not grant those permissions. Inserts started failing because of an inability to create {tablename}_seq.

I did eventually figure out that a missing sequenceKey() implementation was the problem, and after some experimentation appear to have figured out how to correctly implement it. However, a lot of time would have been saved at it been in the documentation.

Thanks again for all of your time and help. This seems to be a really great library.

Test script:
---------------
You should be able to use the example on the page I listed with a mysql database where the user does not have table create permissions granted.

Expected result:
----------------
Inserts and updates will fail</pre>]]></description>
      <dc:date>2009-10-18T03:51:31+00:00</dc:date>
      <dc:creator>balexander &amp;#x61;&amp;#116; visionpointsystems &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14794">
      <title>DB_DataObject: Feature/Change Request 14794 [Open] UTF8 Support for MYSQL database</title>
      <link>http://pear.php.net/bugs/14794</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by repher
2008-10-14T14:01:25+00:00
PHP: 5.2.6 OS: irrelevant Package Version: 1.8.8

Description:
------------
Mysql does not use utf8 by default. Since i almost never use anything 
else than utf8, i have to modify the DB_DataObject class everytime to 
execute a 
'set names utf8' query at the end of the _connect function. Maybe we 
should consider implementing a feature to check if there is for 
example a 
'mysql_client_encoding' option in the options.

I have implemented a simple addition to _connect to solve this 
problem:

if (isset($_DB_DATAOBJECT['CONFIG']['mysql_client_encoding'])) {
  if ($_DB_DATAOBJECT['CONNECTIONS'][$this-&gt;_database_dsn_md5]-
&gt;dsn['phptype'] == 'mysqli') {
    $_DB_DATAOBJECT['CONNECTIONS'][$this-&gt;_database_dsn_md5]-
&gt;query(&quot;SET NAMES &quot; . 
$_DB_DATAOBJECT['CONFIG']['mysql_client_encoding'] );
  }
}</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by repher
2008-10-14T14:01:25+00:00
PHP: 5.2.6 OS: irrelevant Package Version: 1.8.8

Description:
------------
Mysql does not use utf8 by default. Since i almost never use anything 
else than utf8, i have to modify the DB_DataObject class everytime to 
execute a 
'set names utf8' query at the end of the _connect function. Maybe we 
should consider implementing a feature to check if there is for 
example a 
'mysql_client_encoding' option in the options.

I have implemented a simple addition to _connect to solve this 
problem:

if (isset($_DB_DATAOBJECT['CONFIG']['mysql_client_encoding'])) {
  if ($_DB_DATAOBJECT['CONNECTIONS'][$this-&gt;_database_dsn_md5]-
&gt;dsn['phptype'] == 'mysqli') {
    $_DB_DATAOBJECT['CONNECTIONS'][$this-&gt;_database_dsn_md5]-
&gt;query(&quot;SET NAMES &quot; . 
$_DB_DATAOBJECT['CONFIG']['mysql_client_encoding'] );
  }
}</pre>]]></description>
      <dc:date>2008-10-14T14:01:25+00:00</dc:date>
      <dc:creator>bernhard &amp;#x64;&amp;#111;&amp;#x74; picher &amp;#x61;&amp;#116; chello &amp;#x64;&amp;#111;&amp;#x74; at</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13934">
      <title>DB_DataObject: Bug 13934 [Open] Problem with MDB2 and getListOf()</title>
      <link>http://pear.php.net/bugs/13934</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by nahuel
2008-05-18T22:23:32+00:00
PHP: 5.2.0 OS: Linux Package Version: 1.8.8

Description:
------------
I tryied to reload the configuration, with -&gt;databaseStructure()
and an error was expected. I use MDB2.

Test script:
---------------
$db-&gt;databaseStructure(&quot;mysql://user:pass@localhost/database&quot;);

Actual result:
--------------
Fatal error: Call to undefined function: MDB2_Driver_mysql::getListOf(). in /usr/share/php/MDB2.php on line 1936</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by nahuel
2008-05-18T22:23:32+00:00
PHP: 5.2.0 OS: Linux Package Version: 1.8.8

Description:
------------
I tryied to reload the configuration, with -&gt;databaseStructure()
and an error was expected. I use MDB2.

Test script:
---------------
$db-&gt;databaseStructure(&quot;mysql://user:pass@localhost/database&quot;);

Actual result:
--------------
Fatal error: Call to undefined function: MDB2_Driver_mysql::getListOf(). in /usr/share/php/MDB2.php on line 1936</pre>]]></description>
      <dc:date>2008-09-17T23:47:04+00:00</dc:date>
      <dc:creator>nahuel &amp;#x61;&amp;#116; ahtna &amp;#x64;&amp;#111;&amp;#x74; org</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13843">
      <title>DB_DataObject: Feature/Change Request 13843 [Open] $_query property not properly restored in fetch()</title>
      <link>http://pear.php.net/bugs/13843</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by markus
2008-05-06T13:39:45+00:00
PHP: 5.2.5 OS: Linux Package Version: 1.8.8

Description:
------------
In fetch(), is there a reason why the $_query property is not restored to its initial value after the last row has been fetched in DB_DataObject::fetch() on line 550?

The property is set to false [line 575] to indicate there is more data to fetch, but after the last row has been fetched there is no reason to keep the DataObject from being reused as far as we can see.

The process of backing up $_query and restoring it is applied successfully in the find() method (see line 410 and 468).</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by markus
2008-05-06T13:39:45+00:00
PHP: 5.2.5 OS: Linux Package Version: 1.8.8

Description:
------------
In fetch(), is there a reason why the $_query property is not restored to its initial value after the last row has been fetched in DB_DataObject::fetch() on line 550?

The property is set to false [line 575] to indicate there is more data to fetch, but after the last row has been fetched there is no reason to keep the DataObject from being reused as far as we can see.

The process of backing up $_query and restoring it is applied successfully in the find() method (see line 410 and 468).</pre>]]></description>
      <dc:date>2008-05-06T14:26:12+00:00</dc:date>
      <dc:creator>markus &amp;#x61;&amp;#116; fischer &amp;#x64;&amp;#111;&amp;#x74; name</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13656">
      <title>DB_DataObject: Documentation Problem 13656 [Verified] Undocumented CONFIG var quote_identifiers_tableinfo</title>
      <link>http://pear.php.net/bugs/13656</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by adamsetzler
2008-04-12T17:14:16+00:00
PHP: 5.2.5 OS:  Package Version: 1.8.8

Description:
------------
Not having &quot;quote_identifiers_tableinfo = 1&quot; causes problems with MDB2 and certain table names.  There is no documentation of this feature outside the code itself.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by adamsetzler
2008-04-12T17:14:16+00:00
PHP: 5.2.5 OS:  Package Version: 1.8.8

Description:
------------
Not having &quot;quote_identifiers_tableinfo = 1&quot; causes problems with MDB2 and certain table names.  There is no documentation of this feature outside the code itself.</pre>]]></description>
      <dc:date>2008-09-17T23:46:40+00:00</dc:date>
      <dc:creator>adam &amp;#x64;&amp;#111;&amp;#x74; setzler &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12694">
      <title>DB_DataObject: Documentation Problem 12694 [Verified] $object-&gt;update($original);</title>
      <link>http://pear.php.net/bugs/12694</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by banquette
2007-12-14T21:15:37+00:00
PHP: 5.2.5 OS: Windows Package Version: 1.8.7

Description:
------------
As a user said on the &quot;update()&quot; page (http://pear.php.net/manual/en/package.database.db-dataobject.db-dataobject.update.php) :

When called with

$object-&gt;update($original);

this function appears to return true rather than 0 if no rows are affected.

Expected result:
----------------
Should return 0 (as no row affected)

Actual result:
--------------
return true</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by banquette
2007-12-14T21:15:37+00:00
PHP: 5.2.5 OS: Windows Package Version: 1.8.7

Description:
------------
As a user said on the &quot;update()&quot; page (http://pear.php.net/manual/en/package.database.db-dataobject.db-dataobject.update.php) :

When called with

$object-&gt;update($original);

this function appears to return true rather than 0 if no rows are affected.

Expected result:
----------------
Should return 0 (as no row affected)

Actual result:
--------------
return true</pre>]]></description>
      <dc:date>2009-10-15T13:17:55+00:00</dc:date>
      <dc:creator>alexor_patator &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; fr</dc:creator>
      <dc:subject>DB_DataObject Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11081">
      <title>DB_DataObject: Feature/Change Request 11081 [Verified] Support for createTables on Postgres with views in schema</title>
      <link>http://pear.php.net/bugs/11081</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by senna
2007-05-19T09:28:44+00:00
PHP: Irrelevant OS:  Package Version: 

Description:
------------
now, you cannot run createTables.php with PostgreSQL when you have defined any views in schema such as 'test_schema.test_view'.

so, I rewrote (Generate.php line220):
                // try getting a list of schema views first. (postgres)
                $views = $__DB-&gt;getListOf('schema.views');
                if (empty($views)|| is_a($views, 'PEAR_Error')) {
                    $views = $__DB-&gt;getListOf('views');
                }

Of cause, this does not work because PEAR_DB don't support 'schema.views'.
Now, I post a request to suport this.(Bug #11080: getListOf('schema.views'))

If my request is accepted in PEAR_DB, please accept this request :-)</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by senna
2007-05-19T09:28:44+00:00
PHP: Irrelevant OS:  Package Version: 

Description:
------------
now, you cannot run createTables.php with PostgreSQL when you have defined any views in schema such as 'test_schema.test_view'.

so, I rewrote (Generate.php line220):
                // try getting a list of schema views first. (postgres)
                $views = $__DB-&gt;getListOf('schema.views');
                if (empty($views)|| is_a($views, 'PEAR_Error')) {
                    $views = $__DB-&gt;getListOf('views');
                }

Of cause, this does not work because PEAR_DB don't support 'schema.views'.
Now, I post a request to suport this.(Bug #11080: getListOf('schema.views'))

If my request is accepted in PEAR_DB, please accept this request :-)</pre>]]></description>
      <dc:date>2008-02-27T06:12:00+00:00</dc:date>
      <dc:creator>senna &amp;#x61;&amp;#116; mugeso &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/10858">
      <title>DB_DataObject: Feature/Change Request 10858 [Open] joinAdd function</title>
      <link>http://pear.php.net/bugs/10858</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by banquette
2007-04-27T10:32:46+00:00
PHP: 5.2.1 OS:  Package Version: 

Description:
------------
I d like to use the joinAdd method with a hard coded query like joinAdd(&quot;LEFt JOIN ...&quot;); I did not find a way to pass throught a table ; i mean when a table is not directly &quot;connected&quot; to another.

Test script:
---------------
&lt;-&gt; means a relationship between table (FK/PK)

table0 &lt;-&gt; table1 &lt;-&gt; table2 &lt;-&gt; table3
One can query table1 with a joinAdd on table0 and/or table2 but not with a joinAdd on table3 as there is no direct relationship. To do such a thing query must actually be hard coded... or I did not find the solution ...
That s why I want a &quot;joinAdd(string $join)&quot; : to keep advantage of methods like selectAdd() to avoid a hard coded query.

Thanks.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by banquette
2007-04-27T10:32:46+00:00
PHP: 5.2.1 OS:  Package Version: 

Description:
------------
I d like to use the joinAdd method with a hard coded query like joinAdd(&quot;LEFt JOIN ...&quot;); I did not find a way to pass throught a table ; i mean when a table is not directly &quot;connected&quot; to another.

Test script:
---------------
&lt;-&gt; means a relationship between table (FK/PK)

table0 &lt;-&gt; table1 &lt;-&gt; table2 &lt;-&gt; table3
One can query table1 with a joinAdd on table0 and/or table2 but not with a joinAdd on table3 as there is no direct relationship. To do such a thing query must actually be hard coded... or I did not find the solution ...
That s why I want a &quot;joinAdd(string $join)&quot; : to keep advantage of methods like selectAdd() to avoid a hard coded query.

Thanks.</pre>]]></description>
      <dc:date>2007-04-27T12:13:34+00:00</dc:date>
      <dc:creator>alexor_patator &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; fr</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/10326">
      <title>DB_DataObject: Bug 10326 [Open] Update on record using update($orignal) method with null values inserts 0's</title>
      <link>http://pear.php.net/bugs/10326</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Bug
Reported by spin
2007-03-11T01:25:15+00:00
PHP: 5.2.0 OS: Linux Package Version: 1.8.5

Description:
------------
I've done a get(), the get returns null values for the fields in question. after doing the get, I do not change any values in the form. I submit a form to edit a record in the DB. The database table has several fields that allow NULL values. the update is of the following form.

$object-&gt;update($original)

This bug has been reported before and is still a problem here using mysql.

https://pear.php.net/bugs/bug.php?id=4919&amp;edit=2

Test script:
---------------
I'm sorry but i do not have the skills needed to make a simple test case, I am instead posting debug output from DBDO that shows the state of the original object and the object to be updated and that they are identical with null values in place.
$DO_ORIGINAL===========DO_TblProperties Object
(   [__table] =&gt; tblProperties
    [intPropertyID] =&gt; 3
    [decSqFt] =&gt; 
    [intHalfBaths] =&gt; 
    [intDeposit] =&gt; 
    [intPriceFurnished] =&gt; 
    [intLeaseLength] =&gt; 
$DO_RENTALS===========DO_TblProperties Object
(   [__table] =&gt; tblProperties
    [intPropertyID] =&gt; 3
    [decSqFt] =&gt; 
    [intHalfBaths] =&gt; 
    [intDeposit] =&gt; 
    [intPriceFurnished] =&gt; 
    [intLeaseLength] =&gt; 

Expected result:
----------------
I expect that the DB record would not be updated since the original object and the object to update are identical and have empty values(null) that are allowed to be null in the DB.

Actual result:
--------------
DO_TblProperties   : QUERY       : UPDATE  `tblProperties`  SET `decSqFt` = 0 , `intHalfBaths` = 0 , `intDeposit` = 0 , `intPriceFurnished` = 0 , `intLeaseLength` = 0   WHERE (  `tblProperties`.`intPropertyID` = 3 )</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Bug
Reported by spin
2007-03-11T01:25:15+00:00
PHP: 5.2.0 OS: Linux Package Version: 1.8.5

Description:
------------
I've done a get(), the get returns null values for the fields in question. after doing the get, I do not change any values in the form. I submit a form to edit a record in the DB. The database table has several fields that allow NULL values. the update is of the following form.

$object-&gt;update($original)

This bug has been reported before and is still a problem here using mysql.

https://pear.php.net/bugs/bug.php?id=4919&amp;edit=2

Test script:
---------------
I'm sorry but i do not have the skills needed to make a simple test case, I am instead posting debug output from DBDO that shows the state of the original object and the object to be updated and that they are identical with null values in place.
$DO_ORIGINAL===========DO_TblProperties Object
(   [__table] =&gt; tblProperties
    [intPropertyID] =&gt; 3
    [decSqFt] =&gt; 
    [intHalfBaths] =&gt; 
    [intDeposit] =&gt; 
    [intPriceFurnished] =&gt; 
    [intLeaseLength] =&gt; 
$DO_RENTALS===========DO_TblProperties Object
(   [__table] =&gt; tblProperties
    [intPropertyID] =&gt; 3
    [decSqFt] =&gt; 
    [intHalfBaths] =&gt; 
    [intDeposit] =&gt; 
    [intPriceFurnished] =&gt; 
    [intLeaseLength] =&gt; 

Expected result:
----------------
I expect that the DB record would not be updated since the original object and the object to update are identical and have empty values(null) that are allowed to be null in the DB.

Actual result:
--------------
DO_TblProperties   : QUERY       : UPDATE  `tblProperties`  SET `decSqFt` = 0 , `intHalfBaths` = 0 , `intDeposit` = 0 , `intPriceFurnished` = 0 , `intLeaseLength` = 0   WHERE (  `tblProperties`.`intPropertyID` = 3 )</pre>]]></description>
      <dc:date>2008-03-23T09:33:06+00:00</dc:date>
      <dc:creator>pear &amp;#x61;&amp;#116; spinink &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>DB_DataObject Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9949">
      <title>DB_DataObject: Feature/Change Request 9949 [Verified] Transaction support</title>
      <link>http://pear.php.net/bugs/9949</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by doctor@...
2007-01-25T20:28:44+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 1.8.5

Description:
------------
Is it possible/reasonable to implement transactions support into DataObject instance ? Maybe something like startTransaction() endTransaction() methods ?</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by doctor@...
2007-01-25T20:28:44+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 1.8.5

Description:
------------
Is it possible/reasonable to implement transactions support into DataObject instance ? Maybe something like startTransaction() endTransaction() methods ?</pre>]]></description>
      <dc:date>2008-06-29T09:47:40+00:00</dc:date>
      <dc:creator>doctor &amp;#x61;&amp;#116; wil &amp;#x64;&amp;#111;&amp;#x74; linux &amp;#x64;&amp;#111;&amp;#x74; krakow &amp;#x64;&amp;#111;&amp;#x74; pl</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9910">
      <title>DB_DataObject: Feature/Change Request 9910 [Analyzed] Custom connection support</title>
      <link>http://pear.php.net/bugs/9910</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by soso_pub@...
2007-01-22T11:42:59+00:00
PHP: 5.0.0 OS: Any Package Version: 1.8.5

Description:
------------
It would be great that db objects can be set to use a custom db connection. This feature would solve a lot of problems regarding transactions because it adds the possibility to modify multiple db objects inside the same transaction - through the same connection.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by soso_pub@...
2007-01-22T11:42:59+00:00
PHP: 5.0.0 OS: Any Package Version: 1.8.5

Description:
------------
It would be great that db objects can be set to use a custom db connection. This feature would solve a lot of problems regarding transactions because it adds the possibility to modify multiple db objects inside the same transaction - through the same connection.</pre>]]></description>
      <dc:date>2007-03-07T03:34:51+00:00</dc:date>
      <dc:creator>soso_pub &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9793">
      <title>DB_DataObject: Documentation Problem 9793 [Open] Documentation for Generator missing</title>
      <link>http://pear.php.net/bugs/9793</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by powtac@...
2007-01-10T12:41:04+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 1.8.5

Description:
------------
A documentation for the great feature of the generator is missing.


Somethinge like this:

require_once 'your config file';

require_once 'DB/DataObject.php';
require_once 'DB/DataObject/Generator.php';

DB_DataObject::debugLevel(5);

$generator = new DB_DataObject_Generator;
$generator-&gt;start();</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by powtac@...
2007-01-10T12:41:04+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 1.8.5

Description:
------------
A documentation for the great feature of the generator is missing.


Somethinge like this:

require_once 'your config file';

require_once 'DB/DataObject.php';
require_once 'DB/DataObject/Generator.php';

DB_DataObject::debugLevel(5);

$generator = new DB_DataObject_Generator;
$generator-&gt;start();</pre>]]></description>
      <dc:date>2007-01-10T12:41:04+00:00</dc:date>
      <dc:creator>powtac &amp;#x61;&amp;#116; gmx &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>DB_DataObject Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9076">
      <title>DB_DataObject: Documentation Problem 9076 [Open] Fetch a specific row</title>
      <link>http://pear.php.net/bugs/9076</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by pas@...
2006-10-18T04:11:19+00:00
PHP: 5.1.6 OS: Debian Package Version: 

Description:
------------
How about changing the following in DataObject.php

function fetch($rownum = NULL)
...
$array = $result-&gt;fetchRow(DB_DATAOBJECT_FETCHMODE_ASSOC, $rownum);

That way you could get any row in the result instead of only the next row. It is already supported by the DB class, so it is a very simple and minor change.</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by pas@...
2006-10-18T04:11:19+00:00
PHP: 5.1.6 OS: Debian Package Version: 

Description:
------------
How about changing the following in DataObject.php

function fetch($rownum = NULL)
...
$array = $result-&gt;fetchRow(DB_DATAOBJECT_FETCHMODE_ASSOC, $rownum);

That way you could get any row in the result instead of only the next row. It is already supported by the DB class, so it is a very simple and minor change.</pre>]]></description>
      <dc:date>2010-04-26T04:19:56+00:00</dc:date>
      <dc:creator>pas &amp;#x61;&amp;#116; pas &amp;#x64;&amp;#111;&amp;#x74; net &amp;#x64;&amp;#111;&amp;#x74; au</dc:creator>
      <dc:subject>DB_DataObject Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/6202">
      <title>DB_DataObject: Documentation Problem 6202 [Open] getLinkArray() missing</title>
      <link>http://pear.php.net/bugs/6202</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by nbraczek@...
2005-12-09T04:25:58+00:00
PHP: Irrelevant OS:  Package Version: 

Description:
------------
The quite usefull method getLinkArray() is not mentioned in the documentation. It is found in DB_DataObject 1.7.15 with a wrong/misleading description.

The doc entry should look like this:

(see 'Test script' field)

regards,
Niels Braczek &lt;nbraczek@bsds.de&gt;

Test script:
---------------
-&gt; getLinkArray()
-&gt; getLinkArray() -- fetch and return a list of related objects

Synopsis
mixed $DB_DataObject-&gt;getLink (string $column [, string $table])

Description
Fetch an array of related objects. This should be used in conjunction with a &lt;dbname&gt;.links.ini file configuration (see the introduction on linking for details on this).
You may also use this with all parameters to specify, the column and related table.

Parameter
* string $column - either column or column.xxxxx
* string $table - name of table to look up value in

Return value
array - array of results (empty array on failure)

Note
This function can not be called statically.

Example
Example xx-1. Getting the related objects

&lt;?php
$person = new DataObjects_Person;
$person-&gt;get(12);
$children = $person-&gt;getLinkArray('children');

echo 'There are ', count($children), ' descendant(s):&lt;br /&gt;';
foreach ($children as $child) {
    echo $child-&gt;name, '&lt;br /&gt;';
}
?&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Documentation Problem
Reported by nbraczek@...
2005-12-09T04:25:58+00:00
PHP: Irrelevant OS:  Package Version: 

Description:
------------
The quite usefull method getLinkArray() is not mentioned in the documentation. It is found in DB_DataObject 1.7.15 with a wrong/misleading description.

The doc entry should look like this:

(see 'Test script' field)

regards,
Niels Braczek &lt;nbraczek@bsds.de&gt;

Test script:
---------------
-&gt; getLinkArray()
-&gt; getLinkArray() -- fetch and return a list of related objects

Synopsis
mixed $DB_DataObject-&gt;getLink (string $column [, string $table])

Description
Fetch an array of related objects. This should be used in conjunction with a &lt;dbname&gt;.links.ini file configuration (see the introduction on linking for details on this).
You may also use this with all parameters to specify, the column and related table.

Parameter
* string $column - either column or column.xxxxx
* string $table - name of table to look up value in

Return value
array - array of results (empty array on failure)

Note
This function can not be called statically.

Example
Example xx-1. Getting the related objects

&lt;?php
$person = new DataObjects_Person;
$person-&gt;get(12);
$children = $person-&gt;getLinkArray('children');

echo 'There are ', count($children), ' descendant(s):&lt;br /&gt;';
foreach ($children as $child) {
    echo $child-&gt;name, '&lt;br /&gt;';
}
?&gt;</pre>]]></description>
      <dc:date>2010-04-26T04:07:00+00:00</dc:date>
      <dc:creator>nbraczek &amp;#x61;&amp;#116; bsds &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>DB_DataObject Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/5790">
      <title>DB_DataObject: Feature/Change Request 5790 [Open] Automatically determine insert/update for an object</title>
      <link>http://pear.php.net/bugs/5790</link>
      <content:encoded><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by richtl@...
2005-10-26T16:17:36+00:00
PHP: 5.1.0 OS: Linux Package Version: 

Description:
------------
The MyObjects library has a store() function that automatically determines whether an object should be inserted or updated depending on whether it exists in the database.

I find I'm writing a log of &quot;if this-&gt;find() then update else insert&quot; sorts of structures. It would make sense to move this into the DB_DataObjects code.

What I'm proposing is essentially,

function store() {
  if( object exists in the database ) {
    // update it from object properties
  } else {
    // insert it as a new row
  }
}</pre>]]></content:encoded>
      <description><![CDATA[<pre>DB_DataObject Feature/Change Request
Reported by richtl@...
2005-10-26T16:17:36+00:00
PHP: 5.1.0 OS: Linux Package Version: 

Description:
------------
The MyObjects library has a store() function that automatically determines whether an object should be inserted or updated depending on whether it exists in the database.

I find I'm writing a log of &quot;if this-&gt;find() then update else insert&quot; sorts of structures. It would make sense to move this into the DB_DataObjects code.

What I'm proposing is essentially,

function store() {
  if( object exists in the database ) {
    // update it from object properties
  } else {
    // insert it as a new row
  }
}</pre>]]></description>
      <dc:date>2005-10-28T01:15:38+00:00</dc:date>
      <dc:creator>richtl &amp;#x61;&amp;#116; arscognita &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>DB_DataObject Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
