This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » How to filter the index view of a module ?
How to filter the index view of a module ? [message #103253] Thu, 29 July 2010 17:14 Go to next message
Weeky  is currently offline Weeky
Messages: 17
Registered: April 2010
Location: France
Junior Member
Hi!

I'm working on a new symfony 1.4 project.
I'have to filter by default the index view with some params.

This is my executeIndex method :

public function executeIndex(sfWebRequest $request)
    {
        

        $filters = $this->getFilters();
        $filters = array_merge($filters, array('is_estate' => true, 'is_archive' => false, 'estate_id' => NULL));
        $this->setFilters($filters);
        parent::executeIndex($request);
}


So, when I try to add 'estate_id => NULL to my filters array, it doesn't work, it ignores the value of 'estate_id'.

This is the SQL result :
SELECT COUNT(*) AS num_results FROM estate e WHERE e.is_estate = '0' AND e.is_archive = '0' 


I would just have :
SELECT COUNT(*) AS num_results FROM estate e WHERE e.is_estate = '0' AND e.is_archive = '0' AND 'estate_id' = NULL


Thanks!

PS: Sorry for my bad english, I'm french...
Re: How to filter the index view of a module ? [message #103259 is a reply to message #103253 ] Thu, 29 July 2010 21:44 Go to previous message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
i think you should detail a little more how you get this sql since the problem is not is the code you pasted.
Previous Topic:sf_method PUT DELETE uses javascript? What about users with it turned off?
Next Topic:EmbeddedForm validatorSchema in bind method
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software