留言板

留言吧

点赞
    1. huang135ab说道:
      Microsoft Edge Windows 10

      这是什么来的 :heixian:

    1. huang135ab说道:
      Microsoft Edge Windows 10

      都是我看不懂的 :lei:

      1. zhou135a zhou135a说道:
        Firefox Windows 10

        不可能 :huaji:

        1. huang135ab说道:
          Microsoft Edge Windows 10

          居然回复了 :huaji: 看来邮箱没问题啊

          1. huang135ab说道:
            Microsoft Edge Windows 10

            话说你都不看tim信息的吗?

          2. huang135ab说道:
            Microsoft Edge Windows 10

            自己回复自己都有提示可还行 :huaji2: :huaji:

  1. zhou135a zhou135a说道:
    Firefox Windows 10

    https://matomo.org/

  2. 123说道:
    Google Chrome Windows 7

    :huaji3:

    1. zhou135a zhou135a说道:
      Google Chrome Windows 7

      测试邮箱

  3. hk说道:
    WebView Android 7.1.1

    $.get("https://v.juhe.cn/weather/index", { cityname: "广州", dtype: "" , key:'3f28ac97be2c0220191c303506702819'},
    function(data){
    console.log(data.result);
    },'jsonp');

  4. 123说道:
    Google Chrome Windows 7

    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;

    import com.mysql.jdbc.Connection;
    import com.mysql.jdbc.PreparedStatement;

    public class DemoTest {

    private static final String DB_URL = "jdbc:mysql://118.24.159.246:3306/zhengzz?" +
    "zeroDateTimeBehavior=convertToNull";
    private static final String USER = "baidu";
    private static final String PASSWORD = "123";
    // private static final String sqlString = "SELECT * FROM users WHERE user_name = ?";
    private static final String sqlString = "INSERT INTO users (user_name,user_password,nike_name,age,user_bith) VALUES (?,?,?,?,?)";
    public static void getConns(){
    // 构建Connection类 连接对象
    Connection connection = null;
    try{
    Class.forName("com.mysql.jdbc.Driver");
    //通过驱动管理者。调用静态方法构建// 需传递参数,
    // 1,数据库连接地址
    // 2,用户名
    // 3,密码
    connection = (Connection) DriverManager.getConnection(DB_URL, USER, PASSWORD);
    //getConnection(DB_URL, USER, PASSWORD);
    }catch (SQLException e) {
    e.printStackTrace();
    } catch (ClassNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    try {
    //sql语句预编译类
    PreparedStatement pStatement =
    (PreparedStatement)connection.prepareStatement(sqlString);
    //对应问好位置的下标传入参数,构建完整的sql
    pStatement.setString(1,"zheng");
    pStatement.setString(2,"123456");
    pStatement.setString(3,"郑重");
    pStatement.setInt(4,18);
    pStatement.setString(5,"1987-06-27");
    //执行sql语句,这里有四种方法对应数据库 增 删 改 查
    pStatement.executeUpdate();
    // rSet.next();

    // System.out.println(rSet.getInt(1));
    // System.out.println(rSet.getString(2));
    // System.out.println(rSet.getString(3));
    // System.out.println(rSet.getString(4));
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    }

    /**
    * @param args
    */
    public static void main(String[] args) {

    getConns();

    }

    // TODO Auto-generated method stub
    // int i = 0;
    // int userid =0;
    // String username = "";
    // String password = "";
    // String nikename = "";
    //
    // String sqlString = "SELECT * FROM users";
    // PreparedStatement pstmt;
    //
    // try {
    //// 构建连接语句对象
    // pstmt = (PreparedStatement)
    // getConns()
    // .prepareStatement(sqlString);
    //// 构建结果 集对象
    // ResultSet rs = pstmt.executeQuery();
    // rs.next();
    // userid = rs.getInt("user_id");
    // username = rs.getString(2);
    // password = rs.getString(3);
    // nikename = rs.getString("nike_name");
    //
    // } catch (SQLException e) {
    // i=2;
    // e.printStackTrace();
    // }finally{
    // System.out.println(i);
    // System.out.println(userid);
    // System.out.println(username);
    // System.out.println(password);
    // System.out.println(nikename);
    // }
    //
    }

  5. 123说道:
    Google Chrome Windows 7

    package com.jdbc;

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import com.mysql.jdbc.PreparedStatement;

    /**
    * MySQL数据库连接提供者
    *
    * @author augear
    */
    public class DemoTest {
    private static final String DB_URL = "jdbc:mysql://118.24.159.246:3306/zhengzz?"+
    "zeroDateTimeBehavior=convertToNull";
    private static final String USER = "baidu";
    private static final String PASSWORD = "123";
    private static final String sqlstring ="INSERT INTO users (user_name,user_password,nike_name,age,user_bith) VALUES (?,?,?,?,?)";
    // private static final String DB_URL = "jdbc:mysql://115.28.60.161:3306"
    // + "/dol?zeroDateTimeBehavior=convertToNull";
    // private static final String USER = "root";
    // private static final String PASSWORD = "southclan2017";

    public static void main(String[] args) {
    getConns();
    }

    public static void getConns(){
    //构建Connection类 连接对象
    Connection connection =null;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    //通过驱动管理者。调用静态方法构建 需传递参数,
    // 1,数据库连接地址
    // 2,用户名
    // 3,密码
    connection =(Connection)DriverManager.getConnection(DB_URL,USER,PASSWORD);
    //getConnection(DE_URL,USER,PASSWORD);
    } catch (SQLException e) {
    e.printStackTrace();
    } catch (ClassNotFoundException e){
    e.printStackTrace();
    }

    try {
    //sql语句预编译类
    PreparedStatement pStatement = (PreparedStatement)connection.prepareStatement(sqlstring);
    //对应问好位置的下标传入参数,构建完整的sql
    pStatement.setString(1, "zheng");
    pStatement.setString(2, "123456");
    pStatement.setString(3, "程重");
    pStatement.setInt(4, 18);
    pStatement.setString(5, "1987-06-27");
    pStatement.executeUpdate();
    } catch (SQLException e) {
    e.printStackTrace();
    }

    }

    }

发表评论

电子邮件地址不会被公开。必填项已用 * 标注