📄 authors.java
字号:
package booksys;
import java.sql.*;
/**作者类*/
public class authors{
int authorid;
String authornm;
String authorintroduce;
String country;
boolean newauthor;
public authors(){
}
public static int searchid(String authornm) throws Exception{
dbconn.conn();
int result;
String sql = "select authorid from authors where authornm='"+authornm+"'";
ResultSet rs = dbconn.dbquery(sql);
if(rs.next()){
result=rs.getInt(1);
}
else{
result=0;
}
dbconn.dbclose();
return result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -