FB, limiting crosslink options table
| From: | d30 | Date: | Wed, 15 Feb 2006 16:48:00 +0000 |
| Subject: | FB, limiting crosslink options table | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22988@lists.php.net to get a copy of this message | ||
Hi, I'm new to DO + FB and I have a question if is poslible in some simple way to
do whereAdd() on the options table?
from /DB/DataObject/FormBuilder.php
-----------------------------------------
1 *
2 * @return array strings representing all of the records in $table.
3 * @access protected
4 */
5 function _getSelectOptions($table, $displayFields = false, $selectAddEmpty = false, $field = false, $valueField = false) {
6 $opts =& DB_DataObject::factory($table);
7 $opts->whereAdd("Something = 'N'");
8 ^^^^^^^^^^^^^^^ # query on the options table
9
10 if (is_a($opts, 'db_dataobject')) {
11 if ($this->isCallableAndExists($this->prepareLinkedDataObjectCallback)) {
12 call_user_func_array($this->prepareLinkedDataObjectCallback, array(&$opts, $field));
13 }
14 if ($valueField === false) {
15 $valueField = $this->_getPrimaryKey($opts);
16 }
I don't want do display all the resolts from the table
I have try with adding $linkedDataObject->whereAdd("Something = 'N'") in prepareLinkedDataObject(), but this add the "Something = 'N'" to both tables (linking and options? table).
thanks,
d30