You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/01 08:45:39 UTC

[GitHub] [shardingsphere] VeejaLiu commented on issue #18127: Python - pymysql: Does not support placeholder in SQL?

VeejaLiu commented on issue #18127:
URL: https://github.com/apache/shardingsphere/issues/18127#issuecomment-1143309664

   Change writting:
   ```python
   sql = "select %s, count(*) from %s group by %s" % (filed, table, filed)
   cursor.execute(sql)
   result = cursor.fetchall()
   ```
   Solved this problem.
   
   Pymysql automatically quotes placeholders. So there will be some SQL statement problems.
   This problem occurs when we use the table name or field name as a placeholder, so we need to use the above method.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org