Re: DB_DataObject

From: Date: Sun, 01 Sep 2002 01:26:38 +0000
Subject: Re: DB_DataObject
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2219@lists.php.net to get a copy of this message
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


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