Selaa lähdekoodia

pārtaisam DB

master
Vitalijss 5 vuotta sitten
vanhempi
commit
31270bf596
2 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  1. +1
    -1
      include/install.php
  2. +1
    -2
      index.php

+ 1
- 1
include/install.php Näytä tiedosto

@@ -56,7 +56,7 @@ echo '<input type="submit" class="w3-button w3-green" name="db_saglabat" value="
$tabulapaterins = "CREATE TABLE IF NOT EXISTS Paterins ( $tabulapaterins = "CREATE TABLE IF NOT EXISTS Paterins (
PatID bigint(5) NOT NULL AUTO_INCREMENT, PatID bigint(5) NOT NULL AUTO_INCREMENT,
PatDaudzums bigint(5) NOT NULL, PatDaudzums bigint(5) NOT NULL,
PatDatums text(15) NOT NULL,
PatDatums DATETIME(24) NOT NULL,
PRIMARY KEY (PatID));"; PRIMARY KEY (PatID));";




+ 1
- 2
index.php Näytä tiedosto

@@ -26,9 +26,8 @@ $result = mysqli_query($conn,$meklejam);
if(isset($_POST['pievienot'])) if(isset($_POST['pievienot']))
{ {
$psk = 1; $psk = 1;
$datums= date("Y-m-d");
//formejam pieprasījumus //formejam pieprasījumus
$pievienot = "insert into Paterins (PatDaudzums,PatDatums) VALUES ($psk,'$datums')";
$pievienot = "insert into Paterins (PatDaudzums) VALUES ($psk)";
$atnemt = "UPDATE Briketes SET BrikAtlicis = BrikAtlicis-1 WHERE `BrikID` = 1"; $atnemt = "UPDATE Briketes SET BrikAtlicis = BrikAtlicis-1 WHERE `BrikID` = 1";
mysqli_query($conn,$atnemt); mysqli_query($conn,$atnemt);
if (mysqli_query($conn,$pievienot)) { if (mysqli_query($conn,$pievienot)) {


Loading…
Peruuta
Tallenna

Powered by TurnKey Linux.