Restrict rows returned for auto Select creation with DB_DataObject_FormBuilder for linked field

From: Date: Fri, 23 Feb 2007 10:21:05 +0000
Subject: Restrict rows returned for auto Select creation with DB_DataObject_FormBuilder for linked field
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26658@lists.php.net to get a copy of this message
Greetings, >> Question How do I restrict the rows returned during automatic Select Box creation by DB_DataObject_FormBuilder for a linked field? >> Full Explanation: I am using DB_DataObject and DB_DataObjec_FormBuilder for the rendering and management of the various objects that I have in an application that I am currently developing I have starting using some of the more advanced features lately including foreign key linking using ".links.ini", nested forms, inheritance and overloading for integration with a security framework etc. I have a problem though with the automatic generation of the select box for one of my forms. It generates the box fine, but includes ALL the entries in the table, where I only want certain rows to be shown. >> My Possible Solutions 1) I have already added a field to each row stating whether it should be included in a select box or not, so all I can see that I need to do is somehow add a 'Where' clause to the query that is used to get the result set for the select box. I unfortunately can't find how to do that though, from the documentation available or any user contributed material on the Net. PREFERRED_SOLUTION 2) I could make another table which only includes those entries which I want displayed and rather link to this table. This would mean that I have to keep the two tables in sync though, which is not a desirable solution. Any help would be most appreciated! Regards Jonathan

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