Skip to content

Commit

Permalink
Update boardview.jsp
Browse files Browse the repository at this point in the history
  • Loading branch information
410-dev committed Jan 15, 2023
1 parent 51df2b2 commit 5725065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/webapp/boardview.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
sql.setUseAutoClose(true);
ResultSet rs = null;
try {
rs = sql.executeQuery("SELECT * FROM " + new Post().getTableName() + " WHERE boardUUID = ?", boardUUID);
rs = sql.executeQuery("SELECT * FROM " + new Post().getTableName() + " WHERE boardUUID = ? ORDER BY postTime DESC;", boardUUID);
}catch (Exception e){
e.printStackTrace();
}
Expand All @@ -44,7 +44,7 @@
Post p = new Post();
p.mapFromResultSet(rs);
%>
<a href="postview.jsp?id=<%=p.getId()%>"><h4>Title</h4></a>
<a href="postview.jsp?id=<%=p.getId()%>"><h4><%=p.getTitle()%></h4></a>
<h5>[<%=p.getRating()%>] <%=p.getYear()%> - <%=p.getMonth()%> - <%=p.getDay()%> <%=p.getHour()%>:<%=p.getMinute()%>:<%=p.getSecond()%> by <%=p.getAuthorName()%></h5>
<h6><%=Math.round(((float) p.getLikes() / (p.getLikes() + p.getDislikes()))*100)%>% people felt helpful.</h6>
<hr>
Expand Down

0 comments on commit 5725065

Please sign in to comment.