I am having problems with the following statement.
SELECT * FROM favorites WHERE personID = 1 HAVING category = "Music"
I am trying to get all the items of Category “Music” where there is “personID” of 1.
Thanks for your help.
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.
As already mentioned by SeventotheSeven, you cannot use HAVING without a GROUP BY.
From your question, I guess you really need a simple AND:
Please also note that SQL uses single quotes around strings, not double quotes.