I have an SQL query in a web application, what I want to show is that the rows with total = 100
are displayed in color verde
and rows with total = 0
are displayed in color rojo
, but not How to implement this function
Could you help me?
<%
consulta conexion = new consulta ("jdbc:oracle:thin:@localhost:1521:XE","pasaportes","oppasaportes");
String consulta = "SELECT id_delegacion, CONTRATO , prerequisitos_tecnologicos, equipamiento, sistema_operacion, privilegios, capacitacion, citas FROM delegaciones";
ResultSet rs = conexion.ejeSelect(consulta);
ResultSetMetaData rsmd = rs.getMetaData();
int col= rsmd.getColumnCount();
for(int k=1;k<=col;k++){
%>
<td><h9> <%= rsmd.getColumnName(k) %></h9></td>
<%
}
%>
</tr>
<%
while(rs.next()){
%>
<tr class="info">
<td><h6><%= rs.getString(1) %></h6> </td>
<td><h6><%= rs.getString(2) %></h6> </td>
<td><h6><%= rs.getString(3) %></h6> </td>
<td><h6><%= rs.getString(4) %></h6> </td>
<td><h6><%= rs.getString(5) %></h6> </td>
<td><h6><%= rs.getString(6) %></h6> </td>
<td><h6><%= rs.getString(7) %></h6> </td>
<td><h6><%= rs.getString(8) %></h6> </td>
</tr>
<%
}
%>
</table>
</div>