Package database

Examples of database.MySQLConnection.SQLSelect()


    System.out.println("connecting to server");
    MySQLConnection conn = new MySQLConnection();
    conn.connect();

    // Get the project repository details
    ResultSet rs = conn.SQLSelect("SELECT * FROM projects");

    while (rs.next()) {

      String url = rs.getString("repos_url");
      String user = rs.getString("repos_user");
View Full Code Here


      String name = rs.getString("name");

      int idProject = rs.getInt("id");
      int lastVersion = 1;
      ResultSet rs2 = conn
          .SQLSelect("select max(version)+1 as last_version from versions where project = "
              + idProject);

      while (rs2.next()) {
        lastVersion = Math.max(lastVersion, rs2.getInt("last_version"));
View Full Code Here

      int idVersion = 1;
      conn.SQLUpdate("insert into versions (project , version , creation_date) values ("
          + idProject + "," + lastVersion + " , sysdate())");

      ResultSet rs3 = conn
          .SQLSelect("select id from versions where version = "
              + lastVersion + " and project = " + idProject);

      while (rs3.next()) {
        idVersion = rs3.getInt("id");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.