// I am trying to count the database registration number according to the situation. [! [enter the description of the image here] [1]] [1]
<?php
$conexion = mysqli_connect("localhost", "root","admin123","database");
? >
Statistics .body { width: 100%; }
.table {
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
margin: 45px;
width: 90%;
text-align: left;
border-collapse: collapse;
}
.td {
padding: 8px;
background: #e8edff;
border-bottom: 1px solid #fff;
color: #669;
border-top: 1px solid transparent;
}
.tr:hover td {
background: #d0dafd;
color: #339;
}
.submit{
background: #33384a;
color: #fff;
padding: 10px
}
.submit:hover{
cursor: pointer;
}
@media(max-width: 480px){
form{
width: 100%;
}
}
</style>
query ($ query);
$ row = $ result-> fetch_assoc (); // that returns an associative array with the name of the field
$ totalServices = $ row ['totalServices']; // This is the value that you just calculated in the query
? >
query ($ query);
$ fil = $ result-> fetch_assoc (); // that returns an associative array with the name of the field
$ totalProgrammed = $ fil ['Scheduled']; // This is the value that you just calculated in the query
? >
query ($ query);
$ fil = $ result-> fetch_assoc (); // that returns an associative array with the name of the field
$ totalProgrammed = $ fil ['Failed']; // This is the value that you just calculated in the query
? >
Service Statistics
Requested services Scheduled Services Failed Services Canceled Services
<tr>
<td><?php echo $fila['totalServicios']; ?></td>
<td><?php echo $fil['Programado']; ?></td>
<td><?php echo $fil['Fallido']; ?></td>
</tr>
</tbody>
</table>