%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="java.text.*" %> <%@ page import="com.assorted.affiliate.data.*" %> <%@ page import="com.assorted.affiliate.display.*" %> <%@ include file="/jsp/session-handler.jsp" %>
|
|
CUSTOMER REFERENCES AND TESTIMONIALS
|
|
| <%@ include file="/ssi/hosting-menu-v3.html" %> |
Our Clients tell our Story <% Connection connection = null; String text = ""; String customerName = ""; String customerURL = ""; String relatedLink = ""; // ------------------------------------------------------------ // Get a connection to the MySQL database: // ------------------------------------------------------------ try { // ------------------------------------------------------------ // Initialize the MySQL JDBC driver: // ------------------------------------------------------------ Class.forName("org.gjt.mm.mysql.Driver").newInstance(); connection = DriverManager.getConnection( "jdbc:mysql://127.0.0.1/aiv_aiv?user=aiv_application&password=s039jxas"); } catch (Exception e) { System.out.println("customer-references-testimonials.jsp: " + e.toString()); } // --------------------------------------------------------------- // Create the SQL we need to retrieve the session from the // database: // --------------------------------------------------------------- String selectSQL = "SELECT * FROM HOSTING_TESTIMONIAL ORDER BY ID DESC"; // --------------------------------------------------------------- // Execute the SQL Statement: // --------------------------------------------------------------- try { int i = 0; String bgcolor = ""; Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(selectSQL); // --------------------------------------------------------------- // Process the results that are found and output them to the // HTML page: // --------------------------------------------------------------- while ( resultSet.next() ) { // String Columns: text = resultSet.getString("TEXT"); customerName = resultSet.getString("CUSTOMER_NAME"); customerURL = resultSet.getString("CUSTOMER_URL"); relatedLink = resultSet.getString("RELATED_LINK"); %>"<%= text %>" -<%= customerName %>
<% } } catch (Exception e) { System.out.println(request.getRequestURI() + " ERROR: " + e.toString()); } %> |