TypeError: callback is not a function

0

I'm doing two queries from bd and I want to move to the page but give this error:

  

TypeError: callback is not a function

The code part is this:

  connection.query('SELECT * FROM marca;SELECT * FROM tipo', 
  function(err, results, fields){
      if(err) throw err;
      else{
        const marcas = {marca:results[0]};
        const tipos = {tipo:results[1]};
        res.render('modelos', marcas, tipos);
      }
    });
    
asked by anonymous 23.07.2018 / 17:59

0 answers