const mysql=require('mysql2')
const connection = mysql.createPool({
host: 'localhost',
user:'root',
password:'whatever it is',
database: "whatever it is"
})
const sqlInsert = 'INSERT INTO reviews (fieldName1, fieldName2) values (?, ?)' // whatever query you want
connection.query(
sqlInsert,
[value1, value2], // inserts into '?' symbol
(err, results, fields) => {
if(err){
console.log(err)
}
else{
console.log(results)
}
}
)