Skip to content

flymorn/jdbc-dbutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jdbc-dbutils

JAVA WEB Development: Jdbc dbUtils for MYSQL.

//------------------------- demo 1: How to use -------------------------

	JdbcUtils jdbc = new JdbcUtils();  
	//initialize map
	Map<String, Object> map = new HashMap<String, Object>() {
		private static final long serialVersionUID = 1L;
		{
	        put("title", request.getParameter("title"));  
	        put("content", request.getParameter("content")); 
		}
	};
	int res = -1;
	try {
		res = jdbc.insert("msg", map);//add
	} catch (SQLException e) {
		e.printStackTrace();
	}
	jdbc.close();//close database connection
	if(res>0){
		//Congratulations, add successful
	}
	else{
		//sorry, add failed
	}

About

JAVA WEB Jdbc dbUtils

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages