cvs: peardoc /en/package/database/db-dataobject intro-relations.xml
| From: | Alan Knowles | Date: | Tue, 25 Oct 2005 04:33:58 +0000 |
| Subject: | cvs: peardoc /en/package/database/db-dataobject intro-relations.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-7089@lists.php.net to get a copy of this message | ||
alan_k Tue Oct 25 00:33:58 2005 EDT
Modified files:
/peardoc/en/package/database/db-dataobject intro-relations.xml
Log:
fix bug #4212 (pecl) termanology
http://cvs.php.net/diff.php/peardoc/en/package/database/db-dataobject/intro-relations.xml?r1=1.6&r2=1.7&ty=u
Index: peardoc/en/package/database/db-dataobject/intro-relations.xml
diff -u peardoc/en/package/database/db-dataobject/intro-relations.xml:1.6
peardoc/en/package/database/db-dataobject/intro-relations.xml:1.7
--- peardoc/en/package/database/db-dataobject/intro-relations.xml:1.6 Tue Nov 11 20:49:15 2003
+++ peardoc/en/package/database/db-dataobject/intro-relations.xml Tue Oct 25 00:33:58 2005
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="package.database.db-dataobject.intro-relations">
<refnamediv>
@@ -126,19 +126,20 @@
<refsect1>
<title>Using link ini files for table links</title>
<para>
- DB_DataObject Version 0.3 introduced the ability to create link ini files so you can map
rows to other database
+ DB_DataObject Version 0.3 introduced the ability to create link ini files so you can map
column to other database
columns using an ini file this ini file should have the name
'databasename.links.ini', and be placed in the
same folder as the database schema ini file 'databasename.ini' file that is
created automatically by createTables.php
</para>
<para>
- The databasename.links.ini file contains a section for each table, then the row that is
linked equal to
- the table and row that it should locate the row from. It assumes the relationships are
non-primary id to primary id,
+ The databasename.links.ini file contains a section for each table, then the column
+ that is linked equal to
+ the table and column that it should locate the column from. It assumes the relationships
are non-primary id to primary id,
as the example below shows, the person.owner is linked to grp.id. This indicates that
running getLinks() on the
person object, will fetch a single bit of data from 3 tables - colurs,grp,attachments.
</para>
<para>
If you use a 'full stop' in the key (link from column), getLinks() will
- look up in the table with the row name matching the string to the left of the 'full
stop', and replace the
+ look up in the table with the column name matching the string to the left of the 'full
stop', and replace the
'full stop' with and underscore and assign the object variable to that name. Or
you may wish to use the
selectAs() method to decide how you want columns from different objects to be returned
(when using joinAdd())
<example>