pymysql-pool icon indicating copy to clipboard operation
pymysql-pool copied to clipboard

execute_query() can't get the lastrowid when insert the record to DB

Open Donald-Su opened this issue 2 years ago • 3 comments

Use the function of execute_query() to insert the record to DB, can't get lastrowid.

And, the function of execute_query() use with context manager, so can't use same connection to execute conn.execute_query("SELECT LAST_INSERT_ID();") sentence to query the LAST_INSERT_ID().

Donald-Su avatar Dec 13 '22 03:12 Donald-Su