Removing trailing spaces in quick search

bkim

Member
Routinely I copy and paste information from excel into the quick search and sometimes when I do, I copy and paste extra spaces after the actual contents. Do you know where in dadabik I would go to find where this value is being inserted into the query so I can remove the trailing spaces?
 

eugenio

Administrator
Staff member
The function is build_where_clause() in business_logic.php.
The values you set in the filters are contained (together with anything else coming from POST) in the var $_POST_2.
 

bkim

Member
Thanks Eugenio! For those of you interested in removing trailing white spaces for contains, I recommend going to the build_where_clause() and scroll down to the default for the switch statement $field_type_temp. There is a second switch statement for $_POST_2[$select_type_field_name_temp] and at the contains case, modify the $_POST_2[$field_name_temp] in the where_clause to trim($_POST_2[$field_name_temp], " " )
 
Top