Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5840439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:44:43+00:00 2026-05-22T11:44:43+00:00

Hi can anyone please tell me why the following code is only returning the

  • 0

Hi can anyone please tell me why the following code is only returning the single value 2,bath

The autocomplete action from 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');

When the same (I Believe) query in MySQL returns

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)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:44:44+00:00Added an answer on May 22, 2026 at 11:44 am

    Ok I’ve actually sorted this by changing the code to that below. Not sure why it is now working as I tried this earlier but it didn’t work.

    My autocomplete action

    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, p.groomprocedure AS name')
           ->from('PetManager_Model_Groomservices g')
          ->leftJoin('g.PetManager_Model_Groomprocedures');
       $result = $gqry->fetchArray();
    
      //generate and return JSON string 
      $data = new Zend_Dojo_Data('groomServicesID',$result);
      echo $data->toJson();
    }
    

    The FilteringSelect on 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');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code is giving me a compilation error. Can anyone please tell me
Can anyone please tell me if Certifying Authorities (CAs) are allowed to make modifications
can anyone please suggest a good code example of vb.net/c# code to put the
Can anyone please tell me why compiling a C# application with a .cs file
Can anyone tell me how I can access the following line of HTML in
Can anyone tell me what's wrong with this robots.txt? http://bizup.cloudapp.net/robots.txt The following is the
Can anyone please tell me to use which jdbc driver to connect with oracle
Can anyone please tell me how to check whether the entered amount (Indian currency)
Can anyone please tell me why I keep getting an error right before the
What does it mean by logical grouping of modules in assembly? Can anyone please

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.