📄 arraysql.java
字号:
package swing;
import com.bwm.string.Str;
import com.zh.conpool.*;
import java.sql.Connection;
import java.sql.ResultSet;
public class Arraysql{
private ResultSet rs=null;
private String sql="";
private String name="";
Condata con=new Condata();
Connection conn=null;
Str str=new Str();
public ResultSet toRs(){
sql="SELECT * FROM tb_th_types";
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage()+"3333");
}
return rs;
}
public ResultSet toRs(String name){
this.name=name;
sql="SELECT Name,Type FROM tb_th_plan where Name='"+this.name+"' group by Type,Name";
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage()+"3333");
}
return rs;
}
public ResultSet toRst(){
sql="SELECT * FROM tb_th_unit";
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage()+"3333");
}
return rs;
}
public ResultSet toRst(String name){
this.name=name;
sql="SELECT Name,Untils FROM tb_th_plan where Name='"+this.name+"' group by Untils,Name";
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage()+"3333");
}
return rs;
}
public ResultSet toRstb(){
sql="SELECT * FROM tb_th_boss";
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage()+"3333");
}
return rs;
}
public void close(){
try{
conn=null;
}catch(Exception e){
System.out.print("f1");
}
try{
con.close();
con=null;
}catch(Exception ee){
System.out.print("f");
}finally{
conn=null;
con=null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -