Combining OR with BOOLEAN MODE in Query
Moderator: General Moderators
Thank you for pushing me in the right direction. The script seems to be working perfectly now.
For information for others on how I got it to work, I set each variable to the portion of the query (i.e. "(Field1='".$value1."') AND") that included its information and then used an ifelse() that check to see if each variable existed. If it did it added the query strings together, if not it added a blank space. Once it went through the five variables, I used trim() first and then rtrim the AND if it did not end with the last variable.
It definitely used less code and works much better. Thank you again.
For information for others on how I got it to work, I set each variable to the portion of the query (i.e. "(Field1='".$value1."') AND") that included its information and then used an ifelse() that check to see if each variable existed. If it did it added the query strings together, if not it added a blank space. Once it went through the five variables, I used trim() first and then rtrim the AND if it did not end with the last variable.
It definitely used less code and works much better. Thank you again.