G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 6th, 2020 149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@ page import = "java.sql.*, java.util.*, java.io.*, util.*" %>
  2.  
  3. <%
  4.   String temp = request.getParameter("temp");
  5.   String loc="";
  6.   String ttime = paodate.getDateTime()+":00";
  7.  
  8.   System.out.println(temp);
  9.   String adostr=
  10.    "mysql,org.gjt.mm.mysql.Driver,jdbc:mysql://localhost/iot02?user=root&password=passwd1234";
  11.    DBConnection conn1 = new DBConnection(adostr);
  12.    String sqlstr = "insert into temp (temp_val,ttime,loc_val) Values ";
  13.    sqlstr += " ("+temp+",'"+ttime+"','"+loc+"');";
  14.    conn1.execsql(sqlstr);
  15.  
  16. %>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top