Your IP : 18.223.213.114


Current Path : /data/web/virtuals/51568/virtual/www/www/lidi/
Upload File :
Current File : /data/web/virtuals/51568/virtual/www/www/lidi/lidi-uloz-DB.php

<?php
require_once('../../funkce/DbConnect.php');


$call = mysqli_prepare($conn, 'CALL kn_lidi_deactivate (?)');
mysqli_stmt_bind_param($call, 's', $typ);
mysqli_stmt_execute($call);

$kodSkRok = (isSet($_POST["kodSkRok"])) ? trim($_POST["kodSkRok"]) : "0";

$call = mysqli_prepare($conn, 'CALL kn_lidi_insert_update (?, ?, ?, ?, ?)');
//if (($handle = fopen($_FILES['fileCSV']['tmp_name'], "r")) !== FALSE) {
if (($handle = fopen($_FILES['fileCSV']['tmp_name'][0], "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
        $pocetPoli = count($data);
        if ($data[0] == 'INTERN_KOD') {continue;}
        if ($pocetPoli == 3) {
          $trida = '';
          $typ = 'u';
        } else {
          $trida = $data[3];
          $typ = 'z';        
        }
      mysqli_stmt_bind_param($call, 'sssss', $data[0], $data[1], $data[2], $typ, $trida);     
      mysqli_stmt_execute($call);
//      mysqli_affected_rows($conn);
      echo   mysqli_error($conn);
    }
}
fclose($handle);

if ($typ = 'z'){

}

      
?>