📄 counter.java
字号:
package server.counter;
import java.util.*;
import server.database.Operation;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* @author user
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class Counter {
Date today=new Date();
Operation op=new Operation();
ResultSet rs=null;
void readDate()
throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException
{
String sql="select * from Counter where date="+today;
rs=op.select(sql);
if(rs==null)
{String sqlI="Insert into Counter(date,times) values("+today+','+'1';
op.IDU(sqlI);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -