Guest User

Untitled

a guest
Aug 2nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. var node_mssql = require('node-mssql');
  2.  
  3. /* add configuration to query object */
  4. var queryObj = new node_mssql.Query({
  5. host: '192.168.1.32\\DESKTOP-70LI671', // You can use 'x.x.x.x\\instance' to connect to named instance
  6. port: 1433,
  7. username: 'sa',
  8. password: 'root',
  9. database: 'test_skip_card'
  10. });
  11.  
  12. /* set table name to operate */
  13. queryObj.table('dbo.data');
  14.  
  15. /* set update query condition */
  16. queryObj.where({
  17. 'name_en': 'Stepan',
  18. })
  19.  
  20. /* run update query and fetch response */
  21. queryObj.select(function(results) {
  22. // success callback
  23. console.log(results);
  24. console.log(results);
  25. if (result.length!=0 && 'Ustinov' == result[0].surname_en){
  26. console.log("True Password!!!");
  27. auth = true;
  28. userId = result[0].Card_ID;
  29. }
  30.  
  31. }, function(err, sql) {
  32. // failed callback
  33. if(err)
  34. console.log(err);
  35.  
  36. console.log(sql);
  37. });
Add Comment
Please, Sign In to add comment