Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const con = mysql.createConnection({
- host: 'localhost',
- user: 'user',
- password: 'password',
- database: 'sitepoint'
- });
- con.query('SELECT * FROM records where flag = 0', (err,rows) => {
- if(err) throw err;
- rows.forEach( (row) => {
- someFunction(row, function(result,err){
- if(err) throw err;
- //Update record in db
- }
- });
- });
Add Comment
Please, Sign In to add comment