/*
* return a single detail of the post; content included.
*/
public static ItemDetail dbGetPostD(String postID) {
ItemDetail result=null;
try{
Statement statement = conn.createStatement();
String sql = "SELECT postID,titleName,description,postDate,useName,content FROM forumitemlist,PersonalInformation WHERE forumitemlist.owner=PersonalInformation.id_pi AND postID="+postID;
ResultSet rs=statement.executeQuery(sql);
if(rs.next()){
result = new ItemDetail(rs.getString("postID"), rs.getString("titleName"), rs.getString("description"),
efrei.ngo.util.GeneralUnil.changeDateToGregorianCalendar(rs.getDate("postDate")), rs.getString("useName"),rs.getString("content"));
}
statement.close();
}catch(Exception ex){
ex.printStackTrace();