app.js
// add a new department to the database
add a new department to the database
add a new department to the database
function addDept(){
    inquirer
        .prompt([
            {
                type: 'input',
                name: 'dept',
                message: "What is the Name of the new Department?"
            }
        ])
        .then((response) => {
            const sql = `INSERT INTO department (dept_name) VALUES (?)`;    
            db.query(sql, response.dept, (err, result) => {
                if (err) { console.log(err); } 
                else { init(); }
            }); })
}
function addDept ( ) { inquirer . prompt ( [ { type : 'input' , name : 'dept' , message : "What is the Name of the new Department?" } ] ) . then ( ( response ) => { const sql = ` ` ; db . query ( sql , response . dept , ( err , result ) => { if ( err ) { console . log ( err ) ; } else { init ( ) ; } } ) ; } ) }
add a new department to the database
add a new department to the database