I am trying to make a query string
$sql = 'select * from table where '. $option1. $option2 etc
how would I go about making that. every query will have different number of options. above have 2, but it could be as many as 10
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could hold these in an array for example. Something like:
You could even compose the whole query with an array, depending on the things you need to change (what I mean is, only make the things you need to change configurable). For example: