On 2019-01-08 06:55,
pingfanr...@gmail.com wrote:
> 'The flavor of python-sql allows you to use almost any database using any
> PEP 249 python library.'
>
> But I still don't know how to use it in mysql.
>
> conn = MySQLdb.Connect(unix_socket = config.mysql_sock,
> user = config.mysql_user,
> passwd = secret,
> connect_timeout=10,
> charset="utf8",
> cursorclass = MySQLdb.cursors.DictCursor)
> cursor = conn.cursor()
>
> user = Table('user')
> select = user.select()
> select.where = user.EnglishName=='testname'
>
> How to excute it ?
> cursor.execute(select) ?
> cursor.execute(tuple(select) ?