Iainkerr01
Technical User
I am creating a query system for my users so that they can generate a result set for themselves.
The form has 4 columns as follows.
1. the 'Join' field (ie blank, and, or)
2. the search field name
3. the condition field (ie = , <>, Like)
4. the value of the field to search on.
The form will have up to 4 rows allowing the uses to create a more complex query involving "and's" & "or's". The query may not necessarily have all 4 rows filled.
The information from each of the rows will be added together to form a SQL statement.
The 'Join' field from row 1 will always be an 'And' as this will be linked to a general 'Where' statement.
Does anyone have a module already written which will help me manage the necessary bracketing within the SQL statement particularly where 'ors' are used?
Thanks in advance.
The form has 4 columns as follows.
1. the 'Join' field (ie blank, and, or)
2. the search field name
3. the condition field (ie = , <>, Like)
4. the value of the field to search on.
The form will have up to 4 rows allowing the uses to create a more complex query involving "and's" & "or's". The query may not necessarily have all 4 rows filled.
The information from each of the rows will be added together to form a SQL statement.
The 'Join' field from row 1 will always be an 'And' as this will be linked to a general 'Where' statement.
Does anyone have a module already written which will help me manage the necessary bracketing within the SQL statement particularly where 'ors' are used?
Thanks in advance.