function start() {
    console.log("******************************-Hello, Welcome to Bamazon!-***********************************");
    connection.query("SELECT * FROM products WHERE stock_quantity >= 0 ORDER BY department_name;", function (err, results) {
        if (err) throw err;
        for (let i = 0; i < results.length; i++) {
            console.log("_________________________________________________________________________________________");
            console.log("ID#:", results[i].item_id, "\n", "\tproduct name:", results[i].product_name, "\t", "price:",
                results[i].price, "\t", "quantity:", results[i].stock_quantity);
        }
        console.log("");
        console.log("*********************************************************************************************");
        setTimeout(prompter, 1500);
    });
}
/*Created a start function that pulls in all the items based on quantity > 0 */
Created a start function that pulls in all the items based on quantity > 0
Created a start function that pulls in all the items based on quantity > 0
function start() {
    console.log("******************************-Hello, Welcome to Bamazon!-***********************************");
    connection.query("SELECT * FROM products WHERE stock_quantity >= 0 ORDER BY department_name;", function (err, results) {
        if (err) throw err;
        for (let i = 0; i < results.length; i++) {
            console.log("_________________________________________________________________________________________");
            console.log("ID#:", results[i].item_id, "\n", "\tproduct name:", results[i].product_name, "\t", "price:",
                results[i].price, "\t", "quantity:", results[i].stock_quantity);
        }
        console.log("");
        console.log("*********************************************************************************************");
        setTimeout(prompter, 1500);
    });
}
function start ( ) { console . log ( "******************************-Hello, Welcome to Bamazon!-***********************************" ) ; connection . query ( "SELECT * FROM products WHERE stock_quantity >= 0 ORDER BY department_name;" , function ( err , results ) { if ( err ) throw err ; for ( let i = 0 ; i < results . length ; i ++ ) { console . log ( "_________________________________________________________________________________________" ) ; console . log ( "ID#:" , results [ i ] . item_id , "\n" , "\tproduct name:" , results [ i ] . product_name , "\t" , "price:" , results [ i ] . price , "\t" , "quantity:" , results [ i ] . stock_quantity ) ; } console . log ( "" ) ; console . log ( "*********************************************************************************************" ) ; setTimeout ( prompter , 1500 ) ; } ) ; }
Created a start function that pulls in all the items based on quantity > 0
Created a start function that pulls in all the items based on quantity > 0