Exemple #1
0
 $s->bindValue(':id', $_POST['id']);
 $s->bindValue(':ordenidfk', $_SESSION['idot']);
 $s->execute();
 $sql = 'UPDATE puntorecilumtbl SET
 nirm=:nirm,
 observaciones=:observaciones,
 identificacion=:identificacion,
 equiposidfk=:luxometro,
 correccion=:correccion
 WHERE puntoidfk = :id';
 $s = $pdo->prepare($sql);
 $s->bindValue(':nirm', $_POST['nirm']);
 $s->bindValue(':observaciones', $_POST['observaciones']);
 $s->bindValue(':identificacion', $_POST['identificacion']);
 $s->bindValue(':luxometro', $_POST["luxometro"]);
 $s->bindValue(':correccion', getCorreccion($_POST['luxometro']));
 $s->bindValue(':id', $_POST['id']);
 $s->execute();
 $sql = "DELETE FROM medsilumtbl\n          WHERE puntoidfk = :id";
 $s = $pdo->prepare($sql);
 $s->bindValue(':id', $_POST['id']);
 $s->execute();
 foreach ($_POST["mediciones"] as $key => $value) {
     if ($value["hora"] != "" && $value["e1plano"] != "" && $value["e2plano"] != "") {
         $sql = 'INSERT INTO medsilumtbl SET
       puntoidfk=:puntoidfk,
       hora=:hora,
       e1pared=:e1pared,
       e2pared=:e2pared,
       e1plano=:e1plano,
       e2plano=:e2plano';
Exemple #2
0
 $s->bindValue(':id', $_POST['id']);
 $s->bindValue(':nom01maximosidfk', $nom01maximosidfk['id']);
 $s->bindValue(':numedicion', intval($_POST['numedicion']), PDO::PARAM_INT);
 $s->bindValue(':lugarmuestreo', $_POST['lugarmuestreo']);
 $s->bindValue(':descriproceso', $_POST['descriproceso']);
 $s->bindValue(':materiasusadas', $_POST['materiasusadas']);
 $s->bindValue(':tratamiento', $_POST['tratamiento']);
 $s->bindValue(':Caracdescarga', $_POST['Caracdescarga']);
 $s->bindValue(':estrategia', $_POST['estrategia']);
 $s->bindValue(':numuestras', $_POST['numuestras']);
 $s->bindValue(':observaciones', $_POST['observaciones']);
 $s->bindValue(':tipomediciones', $_POST['tipomediciones']);
 $s->bindValue(':tipodescarga', $_POST['tipodescarga']);
 $s->execute();
 $id = $pdo->lastInsertid();
 $correccion = getCorreccion($_POST['termometro']);
 $calibracion1 = getCalibracion1($correccion, $_POST['temperatura']);
 $calibracion2 = getCalibracion2($correccion, $_POST['temperatura']);
 /*$sql='INSERT INTO muestreosaguatbl SET
   generalaguaidfk=:generalaguaidfk,
   fechamuestreo=:fechamuestreo,
   identificacion=:identificacion,
   temperatura=:temperatura,
   caltermometro=:caltermometro,
   caltermometro2=:caltermometro2,
   pH=:pH,
   conductividad=:conductividad,
   mflotante=:mflotante,
   equipoidfk=:equipoidfk,
   correccionterm=:correccionterm';*/
 $sql = 'INSERT INTO muestreosaguatbl SET