?? topicdao3.java
字號:
package dao;
import javax.sql.RowSet;
public class TopicDao3 {
public RowSet getTitlesByAuthorName(String authorName) {
SqlBean sb=SqlBean.getInstance();
return sb.getRowSet("select a.name title,b.name author from topic a,author b where a.user_id=b.id and b.name='"+authorName+"'","");
}
public static void main(String[] args) {
TopicDao3 app = new TopicDao3();
try
{
RowSet rs = app.getTitlesByAuthorName("bbb");
while(rs.next())
{
System.out.print("titile="+rs.getString("title")+",author=");
System.out.println(rs.getString("author"));
}
}
catch (Exception e) {
// TODO 自動生成 catch 塊
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -