Hi, As i see..i think i can not add few addXXXColumnQuery methods and create a query in parts. I tell you why. I have 2 "custom inputs", so if i create 2 addXXXColumnQuery methods, ill end with something like this:
public function addMyCustomInput1ColumnQuery($query, $field, $value) { } public function addMyCustomInput2ColumnQuery($query, $field, $value) { } Now the query i need to create is this one: $auery = Select * table where (initial_date <= myCustomInput1 and final_date >= myCustomInput1 ) (*) or (final_date >= myCustomInput2 and initial_date <= myCustomInput2 ) (**) or (initial_date >= myCustomInput1 and final_date <= myCustomInput2) (***) First of all, as you see i need to create 3 conditions(marked with (*), (**) and (***) ) and following your approach i only got 2 methods(one for each field that i am using, these are:myCustomInput1 and myCustomInput2), Second each condition uses both fields for creating the query, so if i use the method as you suggest: public function addMyCustomInput1ColumnQuery($query, $field, $value) { //HERE I GET THE MyCustomInput1 value $field = $this->getFieldName($field); //HERE I USE THE $field VARIABLE TO MAKE THE FIRST CONDITION..BUT ALSO NEED TO GET THE myCustomInput1 VALUE TOO...AND INSIDE THIS METHOD I DONT KNOW HOW, I //NEED SOMTHING LIKE $query->andWhere(initial_date <= $fieldName and final_date >= myCustomInput1 ) } and as you can see even i i create the first condition comehow, even i have to separece eachone (*),(**) and (***) with OR. So, please note the query i need to create, i have 2 OR and 3 ANDS, each AND uses myCustomInput1 and myCustomInput1 for creating the differents conditions... This is why i can not use just the addXXXColumnQuery and create the query by parts... Am i right? 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 at http://groups.google.com/group/symfony-users?hl=en