Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','XYZ','XYZ');
- a =$('his_user_id');
- responseStatus=Response.getStatus();
- loger.info(responseStatus);
- if(responseStatus == SENT) {
- var result = dbConn.executeUpdate("UPDATE his_user SET status =0 where id"+a);
- return result;
- }
- }
- finally {
- if (dbConn) {
- dbConn.close();
- }
- }
- var dbConn;
- try {
- dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','root','root');
- 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'");
- return result;
- }
- finally {
- if (dbConn) {
- dbConn.close();
- }
- }
Add Comment
Please, Sign In to add comment