Created
May 3, 2016 09:41
-
-
Save Haosvit/6f03634f5548181f6f1db9e64ed42fc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page import="java.sql.DriverManager"%> | |
<%@page import="java.sql.Statement"%> | |
<%@page import="java.sql.Connection"%> | |
<%@ page language="java" contentType="text/html; charset=UTF-8" | |
pageEncoding="UTF-8"%> | |
<% | |
String driverName = "com.mysql.jdbc.Driver"; | |
String connectionURL = "jdbc:mysql://localhost:3306/data?useUnicode=true&characterEncoding=UTF-8"; | |
Connection conn; | |
Statement st; | |
//register drive sql jdbc | |
Class.forName(driverName); | |
// create connection; | |
conn = DriverManager.getConnection(connectionURL, "root", ""); | |
// create statement for execute queries | |
st = conn.createStatement(); | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment