Do you really need all the values together? Can't you just create a few addXXXColumnQuery methods and create a query in parts?
Example of my filter where I added the choice: class CommentFormFilter extends BaseCommentFormFilter { public function configure() { $this->widgetSchema['cmtext'] = new sfWidgetFormFilterInput(array('template' => '%input% %empty_checkbox% %empty_label%')); $this->widgetSchema['cmpublish'] = new sfWidgetFormChoice(array( 'choices' => CommentPublish::getArray(), 'expanded' => true, 'multiple' => true )); $this->validatorSchema['cmpublish'] = new sfValidatorChoice(array( 'required' => false, 'choices' => array_keys(CommentPublish::getArray()), 'multiple' => true )); } public function addCmpublishColumnQuery($query, $field, $value) { $fieldName = $this->getFieldName($field); if (!empty($value)) { $query->andWhereIn(sprintf('%s.%s', $query->getRootAlias(), $fieldName), $value); } } } On 3 kvě, 05:19, fRAnKEnSTEin <shirkav...@gmail.com> wrote: > hi There, > > i do not need to make a join just a "select * from where > myCriteriaHere" the criteria is: > > (initial_date <= myCustomInput1 and final_date >= > myCustomInput1 ) > or > (final_date >= myCustomInput2 and initial_date <= > myCustomInput2 ) > or > (initial_date >= myCustomInput1 and final_date <= myCustomInput2) > > As yo can see i need to acces 2 values for create the query, following > your example supose i have 2 coupon fields, and into my > addCouponColumnCriteria method, i will need access to my coupon value > and my coupon2 value, but as long a i can see, if i use the method > "addCouponColumnCriteria", i only have acces to the coupon field, that > its value comes into the $value parameter. > > So how can i create a method addGENERICColumnCriteria, where i can > have access to all the fields so i can create my complex criteria > using all the values that i need? or is there any way to acces the > values of the other fields inside addCouponColumnCriteria method? > > Do you got me? BTW i do not have any idea of what these things you > used means: "CustomerPeer::ID, WebsitePeer::CUSTOMER_ID" > > Cheers > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en