Ok been doing a little reading on this and now have the filteringselect
populating with only one value.

Can anyone tell me why when I run the following query in MySQL I get

mysql> select g.groomservicesid AS iden , p.groomprocedure as name
    -> from groomservices AS g LEFT JOIN groomProcedures AS p
    -> on g.groomProcedure = p.groomProceduresID;
+------+--------------------------+
| iden | name                     |
+------+--------------------------+
|    2 | Bath                     |
|    7 | Bath                     |
|    8 | Bath                     |
|    9 | Bath                     |
|    1 | Nail Clip                |
|    4 | Nail Clip                |
|    5 | Nail Clip                |
|    6 | Nail Clip                |
|   19 | Shed Less                |
|   20 | Shed Less                |
|   21 | Shed Less                |
|   22 | Shed Less                |
|   13 | Dematting/Hand Stripping |
|   14 | Dematting/Hand Stripping |
|   15 | Dematting/Hand Stripping |
|   16 | Dematting/Hand Stripping |
|   17 | Dematting/Hand Stripping |
|   18 | Dematting/Hand Stripping |
|    3 | Bath Brush               |
|   10 | Bath Brush               |
|   11 | Bath Brush               |
|   12 | Bath Brush               |
+------+--------------------------+
22 rows in set (0.00 sec)

But when I use the following I only get 2,Bath returned i.e. one record

My autocomplete action within my controller

   
   public function groomappointserviceAction()
  {
   
   $this->_helper->layout->disableLayout();
    $this->getHelper('viewRenderer')->setNoRender(true);

    // get a list of all grooming services IDs and related procedures
   $gqry= Doctrine_Query::create()
    ->select('g.groomServicesID AS iden , p.groomprocedure AS name')
    ->from('PetManager_Model_Groomservices g')
    ->leftJoin('g.PetManager_Model_Groomprocedures p');
    $result = $gqry->fetchArray();

   //generate and return JSON string 
   $data = new Zend_Dojo_Data('iden',$result);
   echo $data->toJson();
  }


The filteringselect of my form

// Create a autocomplete select input for the grooming
       $gservice = new
Zend_Dojo_Form_Element_FilteringSelect('gapmtService');
         $gservice->setLabel('Proceedure');
       $gservice->setOptions(array(
          'autocomplete' => true,
          'storeID'   => 'groomappointserviceStore',
          'storeType' => 'dojo.data.ItemFileReadStore',
          'storeParams' => array('url' =>
"/groomappointments/appointment/groomappointservice"),
          'dijitParams' => array('searchAttr' => 'name')))
            ->setRequired(true)
            ->addValidator('NotEmpty', true)
            ->addFilter('HTMLEntities')            
            ->addFilter('StringToLower')        
            ->addFilter('StringTrim');

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Help-needed-creating-filteringselect-from-joined-tables-tp3470508p3522649.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to