Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package serverapp;
  7.  
  8. import java.sql.Connection;
  9. import java.sql.DriverManager;
  10. import java.sql.SQLException;
  11.  
  12. /**
  13.  *
  14.  * @author admin
  15.  */
  16. public class TovarService {
  17.    
  18.     // select naim, sum(kol) from test.tovar group by naim order by naim    
  19.     //
  20.     private static Connection getConn() throws SQLException {
  21.         //
  22.         String connectionString = "jdbc:mariadb://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&user=root&password=";
  23.         final Connection connection = DriverManager.getConnection(connectionString);
  24.         return connection;
  25.     }
  26.    
  27.     // метод для получения данных из таблицы tovar    
  28.     public TovarItem[] getItems(){
  29.        
  30.         return null;
  31.     }    
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement