Subject:
DB_DataObject
From:
".. .." <yourhoast@hotmail.com>
Date:
Sat, 31 Aug 2002 14:45:34 +0000
Hey ... just wondering if anyone can show some more detailed eg of linking tables with the dataobject... the ones on the site im a little confused about... thanx
Article Table:
id
summary
body
writerid
category
(2 other tables person and grp exist)
--------------------------------
a links.ini
[article]
writerid = person:id
category = categories:id
--------------------------------
$article = DataObjects_Article::staticGet(12);
//say article 12 was written by person 4 and has a category of 6
$article->getLinks();
will effectively do
$article->_writerid = DataObjects_Person::staticGet('id',4);
$article->_category = DataObjects_Categories::staticGet('id',6);
Regards
Alan
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com