Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page import = "java.sql.*, java.util.*, java.io.*, util.*" %>
- <%
- String temp = request.getParameter("temp");
- String loc="";
- String ttime = paodate.getDateTime()+":00";
- System.out.println(temp);
- String adostr=
- "mysql,org.gjt.mm.mysql.Driver,jdbc:mysql://localhost/iot02?user=root&password=passwd1234";
- DBConnection conn1 = new DBConnection(adostr);
- String sqlstr = "insert into temp (temp_val,ttime,loc_val) Values ";
- sqlstr += " ("+temp+",'"+ttime+"','"+loc+"');";
- conn1.execsql(sqlstr);
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement