feat: update footer with site policies, add CTA retrieval SQL, and refactor block content management
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class update_theme {
|
||||
public static void main(String[] args) {
|
||||
String url = "jdbc:oracle:thin:@localhost:1521/sisvietnam";
|
||||
String user = "sisvietnam";
|
||||
String password = "sisvietnam";
|
||||
|
||||
try (Connection conn = DriverManager.getConnection(url, user, password)) {
|
||||
// Let's first see what's in sis_setting
|
||||
try (PreparedStatement checkStmt = conn.prepareStatement("SELECT ID, THEME FROM sis_setting")) {
|
||||
ResultSet rs = checkStmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
System.out.println("ID: " + rs.getLong("ID") + ", THEME: " + rs.getString("THEME"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error reading theme: " + e.getMessage());
|
||||
}
|
||||
|
||||
// Update theme
|
||||
String updateQuery = "UPDATE sis_setting SET THEME = 'umass'";
|
||||
try (PreparedStatement updateStmt = conn.prepareStatement(updateQuery)) {
|
||||
int rows = updateStmt.executeUpdate();
|
||||
System.out.println("Rows updated: " + rows);
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user