Invalid syntax in executing SQL query using python : <p>I am trying to run the below SQL query using pymysql in python</p>

<pre><code>cursor.execute(""SELECT count(1) from user_login WHERE user_id="+username + "and password="+password"")
</code></pre>

<p>Here username=abc and password=xyz are variables with values</p>

<p>I know there is a problem with quotation marks.Can someone suggest me the right way to do this?</p>
