Guest User

Untitled

a guest
Apr 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. try {
  2. dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','XYZ','XYZ');
  3.  
  4. a =$('his_user_id');
  5.  
  6. responseStatus=Response.getStatus();
  7.  
  8. loger.info(responseStatus);
  9.  
  10. if(responseStatus == SENT) {
  11. var result = dbConn.executeUpdate("UPDATE his_user SET status =0 where id"+a);
  12.  
  13. return result;
  14. }
  15. }
  16. finally {
  17. if (dbConn) {
  18. dbConn.close();
  19. }
  20. }
  21.  
  22. var dbConn;
  23. try {
  24. dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','root','root');
  25.  
  26. var result = dbConn.executeCachedQuery("SELECT his_user.Id AS his_user_Id, his_user.His_username AS his_user_His_username, his_user.His_useraddress AS his_user_His_useraddress, his_user.status AS his_user_status FROM his_user where his_user.status='1'");
  27.  
  28. return result;
  29. }
  30. finally {
  31. if (dbConn) {
  32. dbConn.close();
  33. }
  34. }
Add Comment
Please, Sign In to add comment