Skip to content
Advertisement

im trying to insert data to mysql from puppeteer (async) but I getting “connection.query is not a function”

I just want to store the data I collected in the database but I getting “connection.query is not a function”

I’ve checked a lot of options to solve the issue and I can not find anything that works. In some of the ways the variables I collected were null and in the other part the connection.query was not a function

Please How to make it work?

Thanks a lot❤️

JavaScript

The interesting part

JavaScript

Advertisement

Answer

I found a solution

JavaScript
Advertisement