Hi guys,
I have a table that I need to update, this table has 20 columns and 31 rows, it's something like this:
Day h0400_0415 h0415_0430 h0430_0445 h0445_0500 h0500_0515 h0515_0530 h0530_0545 h0545_0600
01 10 12 10 12 10 12 10 12
02 20 30 20 30 20 30 20 30
03 10 12 10 12 10 12 10 12
04 20 30 20 30 20 30 20 30
05 10 12 10 12 10 12 10 12
06 20 30 20 30 20 30 20 30
I know there are a lot of fields, but I need to update all at once.
all the values comes from 620 text boxes, so there are 20 textboxes per day and the name of the text boxes are:
for day 1 =====> h01_0400_0415, h01_0415_0430, h01_0430_0500 ......... until h01_0845_0900
for day 2 =====> h02_0400_0415, h02_0415_0430, h02_0430_0500 ......... until h02_0845_0900
for day 3 =====> h03_0400_0415, h03_0415_0430, h03_0430_0500 ......... until h03_0845_0900
And this is my query I'm trying to build:
$mysqli1 = new mysqli($DBhost, $DBuser, $DBpass, $DBname);
if ($mysqli1->connect_errno) {
printf("No fue posible conectarse a la base de datos: %s\n", $conn->connect_error);
exit();
}else{
$result1 = "UPDATE control_citas SET h0400_0415 = '$_POST['01_h0400_0415']', h0415_0430 = '$_POST['01_h0415_0430']' WHERE ano = '2015' && mes = '$mes'";
if (!$result1) {
echo "NO SE PUDO ACTUALIZAR LA BASE DE DATOS";
exit();
}else{
Please guys any advaice??
Thank you.