Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7dd550bc

Přidáno uživatelem Tomáš Pašek před více než 3 roky(ů)

oprava update

Zobrazit rozdíly:

application/model/DB.php
373 373

  
374 374
        // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Tabulka dd_manuscript |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
375 375

  
376
        if (array_key_exists("wordform_id", $_POST) && $_POST['wordform_id'] != "") {
376
        if (array_key_exists("id", $_POST) && $_POST['id'] != "") {
377 377
            $query = "SELECT * FROM dd_manuscript WHERE ";
378 378
            $query .= " wordform_id = :wordform_id ;";
379 379
        }
380 380

  
381 381
        $this->stmt = $this->pdo->prepare($query);
382
        if (array_key_exists("wordform_id", $_POST) && $_POST['wordform_id'] != "") {
383
            $this->stmt->bindParam(':wordform_id', $_POST['wordform_id'], PDO::PARAM_INT);
382
        if (array_key_exists("id", $_POST) && $_POST['id'] != "") {
383
            $this->stmt->bindParam(':wordform_id', $_POST['id']);
384 384
        }
385 385
        $this->stmt->execute();
386 386
        $result = $this->stmt->fetchAll();
......
413 413

  
414 414

  
415 415
            $this->stmt = $this->pdo->prepare($query);
416
            if (array_key_exists("wordform_id", $_POST) && $_POST['wordform_id'] != "") {
417
                $this->stmt->bindParam(':wordform_id', $_POST['wordform_id'], PDO::PARAM_INT);
416
            if (array_key_exists("id", $_POST) && $_POST['id'] != "") {
417
                $this->stmt->bindParam(':wordform_id', $_POST['id'], PDO::PARAM_INT);
418 418
            }
419 419
            //
420 420
            $this->stmt->execute();
......
427 427
            $query .= " " . $id_to_insert . " ); ";
428 428

  
429 429
            $this->stmt = $this->pdo->prepare($query);
430
            if (array_key_exists("wordform_id", $_POST) && $_POST['wordform_id'] != "") {
431
                $this->stmt->bindParam(':wordform_id', $_POST['wordform_id'], PDO::PARAM_INT);
430
            if (array_key_exists("id", $_POST) && $_POST['id'] != "") {
431
                $this->stmt->bindParam(':wordform_id', $_POST['id'], PDO::PARAM_INT);
432 432
            }
433 433
            $this->stmt->execute();
434 434
        }

Také k dispozici: Unified diff