i use this statement for a single where condition
(‘SELECT * FROM users WHERE id = ?’, 1)
if I want to check two conditions, how would I do that
(‘SELECT * FROM users WHERE id=? AND age=?’, 1,23)- is this correct?
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.
It depends on the client library and/or framework you’re using. In most cases, what you’ve got there is fine. In others, you have to pass an array, and in others still, you can pass an associative array (or dictionary) and use named values in your query.
If you want a more detailed answer, you need to provide more details.