What points should be kept in mind while writing queries as under?
$sql=” And two=2″;
$sql.=” And three=3″;
$sqlquery=”select * from”.$sql;
I want to make complex queries like the example
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’d better add
where 1=1into your main query. This way you could or could not have any number of AND-joined conditions.Like this:
UPDATE: Doctrine ORM style quering: