Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. **//Acredito que o problema está aqui.**
  2. msql = require('mysql'),
  3.  
  4. connection = msql.createConnection({
  5. host: 'localhost',
  6. user: 'root',
  7. password : 'root',
  8. database: 'bd_barbearia'
  9. }),
  10.  
  11. criarConexao: function(){
  12. connection.connect();
  13. },
  14.  
  15. fecharConexao: function(){
  16. connection.end();
  17. },
  18.  
  19. verificarUsuario: function(nome,senha){
  20. connect.query("call verificarCliente('"+this.nome+"','"+this.senha+"')", function(error,results){
  21. if(error) throw error;
  22. lista = JSON.parse(JSON.stringify(results[0]));
  23. resposta = String(lista[0].alert);
  24.  
  25. return resposta;
  26. });
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement