From 6c4cab0a9f5dbc019d81eeaeae46c8f17c7bdca7 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 12 Oct 2014 21:03:33 +0200 Subject: Rename the "do_single_page" database column to "special_name", and update Java variables accordingly. The SQL command is: ALTER TABLE entries RENAME do_single_page TO special_name ; --- org/madore/damlengine/WeblogServlet.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'org/madore/damlengine/WeblogServlet.java') diff --git a/org/madore/damlengine/WeblogServlet.java b/org/madore/damlengine/WeblogServlet.java index 2ceb448..0f7341c 100644 --- a/org/madore/damlengine/WeblogServlet.java +++ b/org/madore/damlengine/WeblogServlet.java @@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse; public class WeblogServlet extends HttpServlet { - private static final long serialVersionUID = 2014101203L; + private static final long serialVersionUID = 2014101204L; @Override public void init(ServletConfig cfg) @@ -79,17 +79,17 @@ public class WeblogServlet extends HttpServlet { try { final Connection conn = WeblogDatabaseConnection.getConnection(); final PreparedStatement selSt - = conn.prepareStatement("SELECT id , extract(epoch from mdate) , do_single_page FROM entries WHERE edate=? AND id=?"); + = conn.prepareStatement("SELECT id , extract(epoch from mdate) , special_name FROM entries WHERE edate=? AND id=?"); selSt.setString(1,date); selSt.setInt(2,number); final ResultSet selRes = selSt.executeQuery(); if ( selRes.next() ) { int id = selRes.getInt(1); double mdate = selRes.getDouble(2); - String doSinglePage = selRes.getString(3); + String specialName = selRes.getString(3); if ( id != number ) throw new ServletException("this cannot happen"); - if ( extra != null && ! extra.equals(doSinglePage) ) + if ( extra != null && ! extra.equals(specialName) ) return new NoSuchPath(); long lastModified = (long)(mdate*1000); long thisLastModified; @@ -120,7 +120,7 @@ public class WeblogServlet extends HttpServlet { try { final Connection conn = WeblogDatabaseConnection.getConnection(); final PreparedStatement selSt - = conn.prepareStatement("SELECT id FROM entries WHERE edate=? AND do_single_page=?"); + = conn.prepareStatement("SELECT id FROM entries WHERE edate=? AND special_name=?"); selSt.setString(1,date); selSt.setString(2,extra); final ResultSet selRes = selSt.executeQuery(); -- cgit v1.2.3