I have the following code, it connects to the database and executes a query and I store it in result2
until it is all right, but at the time that I print the records I want that only prints a single record only the date and time and not the time with minutes.
Someone could guide me to find a solution.
<tr class="header">
<th>Nombre</th>
<th>fecha</th>
<th>Hora</th>
<th>Int</th>
<th>
<p>Escoger Todos</p>
<input type="checkbox" id="checkAll"/>
</th>
</tr>
<?php
if($myrow = mysql_fetch_array($result2))
{
do
{
$cuenta_eventos++;
?>
<tr>
<th><?php printf("%s",$myrow["nombre"]);?></th>
<th><?php printf("%s",$myrow["fecha"]);?></th>
<th><?php printf("%s",$myrow["hora"]);?></th>
<th><?php printf("%s",$myrow["int"]);?></th>
<th><p>Escoger Evento</p><input type="checkbox" class="case" name="case[]" value="<?php printf("%s",$myrow["nombre"]);?>"></th>
</tr>
<?php
}while ($myrow = mysql_fetch_array($result2));
}else {
}
?>
I get the following result:
Nombre | Fecha | Hora | Int
SANT | 2016-10-03 | '03:00:00' | 1m
FNAT | 2016-10-03 | '03:00:00' | 1m
FNAT | 2016-10-03 | '03:07:00' | 1m
FNAT | 2016-10-03 | '03:016:00' | 1m
The result I want to obtain is the following:
Nombre | Fecha | Hora | Int
SANT | 2016-10-03 | '03:00:00' | 1m
FNAT | 2016-10-03 | '03:00:00' | 1m