-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbstart.php
39 lines (39 loc) · 2.4 KB
/
dbstart.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
require("veza.php");
echo "-->BRISANJE TABELA<BR>";
$pojm="DROP TABLE vozila";
$ishod=mysqli_query($con,$pojm);
$pojm="DROP TABLE vozaci";
$ishod=mysqli_query($con,$pojm);
$pojm="DROP TABLE servis";
$ishod=mysqli_query($con,$pojm);
$pojm="DROP TABLE tehpreg";
$ishod=mysqli_query($con,$pojm);
$pojm="DROP TABLE kazpre";
$ishod=mysqli_query($con,$pojm);
$pojm="DROP TABLE primo";
$ishod=mysqli_query($con,$pojm);
$pojm="DROP TABLE oprema";
$ishod=mysqli_query($con,$pojm);
echo "-->FORMIRANJE TABELE SA VOZILIMA<BR>";
$pojm="CREATE TABLE vozila (IDVO varchar(12) NOT NULL,REGBR text NOT NULL,SERBR varchar(17) NOT NULL,MAVO text NOT NULL,GODPR varchar(4) NOT NULL,KUBI text NOT NULL,DATRG varchar(10) NOT NULL,SLIKA text NOT NULL)";
$ishod=mysqli_query($con,$pojm);
echo "-->FORMIRANJE TABELE SA VOZACIMA<BR>";
$pojm="CREATE TABLE vozaci (IDVO varchar(12) NOT NULL,IMPR text NOT NULL,DATROD varchar(10) NOT NULL,LKBR varchar(10) NOT NULL,BRVZD varchar(10) NOT NULL,MUP text NOT NULL,SLK text NOT NULL)";
$ishod=mysqli_query($con,$pojm);
echo "-->FORMIRANJE TABELE ZA SERVISE<BR>";
$pojm="CREATE TABLE servis (IDSR varchar(12) NOT NULL,IDVO varchar(12) NOT NULL,DATS varchar(10) NOT NULL,IZVS text NOT NULL,ODGL text NOT NULL,KONL text NOT NULL,OPIS text NOT NULL)";
$ishod=mysqli_query($con,$pojm);
echo "-->FORMIRANJE TABELE ZA TEHNICKI PREGLED<BR>";
$pojm="CREATE TABLE tehpreg (IDTP varchar(12) NOT NULL,IDVO varchar(12) NOT NULL,DATTP varchar(10) NOT NULL,IZVTP text NOT NULL,OPIS text NOT NULL)";
$ishod=mysqli_query($con,$pojm);
echo "-->FORMIRANJE TABELE ZA KAZNE I PREKRSAJE<BR>";
$pojm="CREATE TABLE kazpre (IDKP varchar(12) NOT NULL,IDVZ varchar(12) NOT NULL,IDVC varchar(12) NOT NULL,RELKP text NOT NULL,DATKP varchar(10) NOT NULL,OPKP text NOT NULL)";
$ishod=mysqli_query($con,$pojm);
echo "-->FORMIRANJE TABELE ZA PRIMOPREDAJU<BR>";
$pojm="CREATE TABLE primo (IDPR varchar(12) NOT NULL,DATPR varchar(10) NOT NULL,IDVZ varchar(12) NOT NULL,IDVI varchar(12) NOT NULL,IDVU varchar(12) NOT NULL,PRII text NOT NULL,PRIU text NOT NULL,STAG text NOT NULL,STAB text NOT NULL)";
$ishod=mysqli_query($con,$pojm);
$pojm="CREATE TABLE oprema (IDPR varchar(12) NOT NULL,REZ varchar(1) NOT NULL,APA varchar(1) NOT NULL,TRO varchar(1) NOT NULL,PRP varchar(1) NOT NULL,KLP varchar(1) NOT NULL,CEK varchar(1) NOT NULL,PRS varchar(1) NOT NULL,UZE varchar(1) NOT NULL)";
$ishod=mysqli_query($con,$pojm);
mysqli_close($con);
?>