<%
String sqlxtgg="select * from dx where leibie='系統公告'";
ResultSet RS_resultxtgg=connDbBean.executeQuery(sqlxtgg);
while(RS_resultxtgg.next())
{
out.print(RS_resultxtgg.getString("content"));
}
%>
String sqlxtgg="select * from dx where leibie='系統公告'";
——准備SQL查詢語句,就是選擇出所有類別為系統公告的記錄
ResultSet RS_resultxtgg=connDbBean.executeQuery(sqlxtgg);
——執行查詢,並得到結果數據集
while(RS_resultxtgg.next()) {
—— 用next()循環(或稱 滾動)該結果集
out.print(RS_resultxtgg.getString("content"));
——獲取content字段的內容,並輸出