Someone would help me to make records overlap in the same table and I have the record of everything I want to see if you can help me is to know how to overlap those records.
---+--------+----------------+------------+----------+----------+----------+----------
Id | Nombre | E-mail | Fecha | Hora de | Hora de | Hora de | Hora de
| | | | Entrada | Comida | Regreso | Salida
---+--------+----------------+------------+----------+----------+----------+----------
28 | Carlos | Carlos90@gmail | 2008-07-17 | 00:37:42 | 00:00:00 | 00:00:00 | 00:00:00
29 | Carlos | Carlos90@gmail | 2008-07-17 | 00:00:00 | 00:00:00 | 00:00:00 | 00:37:49
---+--------+----------------+------------+----------+----------+----------+----------
My question is if someone knows how to make the entry time and departure time record, are the same record, then I share the entry time code and I hope you can help me.
include "../Funciones/Conexion.php";
$mysqli = inicio();
$nombre = $_POST["nombre"];
$email = $_POST["email"];
$fecha = date('d/m/y');
$hora = date('H:i:s');
$sql = "INSERT INTO chequeo (nombre,email,fecha,hora)
VALUES ('$nombre','$email','$fecha','$hora');";
$query = mysqli_query($mysqli,$sql);
if ($query){
echo "<script>alert(\"Exito al registrar.\"); </script>";
echo "<script>location.href='../Usuario.php'</script>";
} else {
echo "<script>alert(\"Error al registrar\"); </script>";
echo "<script>location.href='../Usuario.php'</script>";
I also have this other one where the exit does someone can help me how to put them together so they overlap
include "../Funciones/Conexion.php";
$mysqli = inicio();
$nombre = $_POST["nombre"];
$email = $_POST["email"];
$fecha = date('d/m/y');
$horaS = date('H:i:s');
$sql = "INSERT INTO chequeo (nombre,email,fecha,horaS)
VALUES ('$nombre','$email','$fecha','$horaS');";
$query = mysqli_query($mysqli,$sql);
if ($query){
echo "<script>alert(\"Exito al registrar.\"); </script>";
echo "<script>location.href='../Usuario.php'</script>";
} else {
echo "<script>alert(\"Error al registrar\"); </script>";
echo "<script>location.href='../Usuario.php'</script>";
}
What I need is that my record more or less is like this
Id | Name | E-mail | Date | Entry Time | Meal Time | Time of Return of Food | Departure Time |
28 | Carlos | Carlos90 @ gmail | 2008-07-17 | 00:37:42 | 00:00:00 | 00:00:00 | 00:40:20