title: How to write where condition in postgres-flask for dynamic values
body: <p>I am looking for a solution to dynamically pass values into the where clause of my postgres query in a flask app.</p>
  
  <p>client is the value that changes dynamically which i want to pass on to 'clientid'. the above method doesn't throw any error, but it is not filtering. the no of rows i expect is 3 but this query fetches everything from payments table</p>
  
  <pre class="lang-py prettyprint-override"><code>client = 'ms0001'
  cur.execute("SELECT * FROM payments WHERE clientid = clientid", client)
  value = cur.fetchall()
  for a in value:
      print(a[0])
  </code></pre>