Adrian Hastro Pagade

Results 2 comments of Adrian Hastro Pagade

const mysql = require('mysql2/promise'); const conn = await mysql.createConnection({ database: bashbase }); const [rows, fields] = await conn.execute('SELECT EXISTS(SELECT 1 FROM bashbase.users WHERE email=?) AS "exists";', [req.body.email]); await conn.end();

@SinghRajKr the code must be inside `async `function. i'm using `.then()` without `async `function