I am needing some help being able to take database results and verify they are displaying on the screen correctly. The table will be as big or little as the amount of data in the database.
Here's some sample HTML for the table:
<table class="table table-hover">
<thead>
<tbody>
<tr class="ng-scope" ng-repeat="item in PaymentHistoryCtrl.paymentHistoryArray | orderBy: 'date' track by $index ">
<td class="ng-binding" ng-bind="item.date | date:'longDate'">February 12, 2016</td>
<td class="ng-binding" ng-bind="item.policyNumber">BTB1716401</td>
<td class="ng-binding" ng-bind="item.total | currency">$3,000.00</td>
<td class="ng-binding" ng-bind="item.referenceNumber">3***8431</td>
</tr>
<tr class="ng-scope" ng-repeat="item in PaymentHistoryCtrl.paymentHistoryArray | orderBy: 'date' track by $index ">
<td class="ng-binding" ng-bind="item.date | date:'longDate'">February 12, 2016</td>
<td class="ng-binding" ng-bind="item.policyNumber">BTB1716401</td>
<td class="ng-binding" ng-bind="item.total | currency">$55.00</td>
<td class="ng-binding" ng-bind="item.referenceNumber">3***8431</td>
</tr>
Here's a sample visual of the table:
I have a sql query to gather the information displayed on the screen. How would I go about matching up the records with the rows/columns in the table, though? Here's the java I'm using for connecting to the db:
//Load the required JDBC Driver class
Connection conn = null;
Statement stmt = null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
//Create a connection to the database
String connection = "jdbc:sqlserver://" + dbName + ":" + dbPort;
conn = DriverManager.getConnection(connection,dbUsername,dbPassword);
//Execute SQL query
stmt = conn.createStatement();
String sql = "select * from Table";
ResultSet rs = stmt.executeQuery(sql);
