?? scorewholequery.java
字號(hào):
package com.itsv.gankao.database;import java.sql.*;import java.util.*;import com.itsv.gankao.common.*;public class ScoreWholeQuery extends Query { public ScoreWholeQuery() { } public void searchByPersonId(Connection conn, String periodId, String personId) throws SQLException{// String sql = "SELECT * FROM " + ScoreWholeTable.TABLE_NAME String sql = "SELECT TCOUNT, WHOLE_SCORE, TNAME FROM " + ScoreWholeTable.TABLE_NAME + " WHERE " + ScoreWholeTable.FULL_COL_PERIOD_ID + " =? " + " AND " + ScoreWholeTable.FULL_COL_PERSON_ID + "=" + "'" + personId + "'"; PreparedStatement statement = conn.prepareStatement(sql); long lPeriodId = new Long(periodId).longValue(); long lPersonId = new Long(personId).longValue(); statement.setLong(1, lPeriodId);// statement.setLong(2, lPersonId); statement_ = statement; result_ = statement.executeQuery();}public String getTcount() throws SQLException{ return new Double(result_.getDouble(ScoreWholeTable.COL_TCOUNT)).toString();}public String getTName() throws SQLException{ return result_.getString(ScoreWholeTable.COL_TNAME);}}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -