Answer the question
In order to leave comments, you need to log in
How to use two WHERE clauses in one SQL?
I need to take design by two sql query criteria.
cur.execute("SELECT design FROM links WHERE domain='" + o.hostname + "', link='" + path + "'")
I thought to do it this way, but I don't know if it works.
Answer the question
In order to leave comments, you need to log in
SELECT design FROM links WHERE domain='" + o.hostname + "' and link='" + path + "'
Just keep in mind that gluing SQL query from strings, as you do, is 100% bad practice, which is fraught with SQL injection . Use Prepared Statements
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question