use*_*290 4 python mysql mysql-connector python-3.x
如何使我的光标成为准备好的语句和字典。我有以下内容。
cursor(cursor_class = MySQLCursorPrepared)
prints <class 'mysql.connector.cursor.MySQLCursorPrepared'>
cursor(dictionary = True)
prints <class 'mysql.connector.cursor.MySQLCursorDict'>
Run Code Online (Sandbox Code Playgroud)
所以我用字典覆盖了准备好的语句。我正在为 python3 使用 mysql 连接器。
我试过了
cursor(prepared=True,dictionary=True)
Run Code Online (Sandbox Code Playgroud)
错误与
Cursor not available with given criteria: dictionary, prepared
Run Code Online (Sandbox Code Playgroud)
有趣的是
cursor(cursor_class = MySQLCursorPrepared,dictionary = True)
Run Code Online (Sandbox Code Playgroud)
我没有收到错误,但数据不是字典类型。
我也有同样的问题。Prepared 和 Dictionary 不能一起使用。
我报告了错误:https : //bugs.mysql.com/bug.php?id=92700
现在我们等待;)
| 归档时间: |
|
| 查看次数: |
1706 次 |
| 最近记录: |