SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';

CREATE SCHEMA IF NOT EXISTS `szoborpark` DEFAULT CHARACTER SET utf8 COLLATE utf8_hungarian_ci ;
USE `szoborpark`;

-- -----------------------------------------------------
-- Table `szoborpark`.`alkotok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`alkotok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`alkotok` (
  `alk_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `alk_nev` VARCHAR(50) NOT NULL DEFAULT '' ,
  `alk_szulev` VARCHAR(4) NULL DEFAULT NULL ,
  `alk_halalev` VARCHAR(4) NULL DEFAULT NULL ,
  `alk_info` VARCHAR(255) NULL DEFAULT NULL ,
  PRIMARY KEY (`alk_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`anyagok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`anyagok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`anyagok` (
  `anyag_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `anyag_nev` VARCHAR(50) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`anyag_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`cimek`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`cimek` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`cimek` (
  `cim_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `cim_nev` VARCHAR(30) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`cim_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`dijak`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`dijak` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`dijak` (
  `dij_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `dij_nev` VARCHAR(50) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`dij_azon`) )
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Table `szoborpark`.`dijazasok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`dijazasok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`dijazasok` (
  `alk_k` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`alkotok` (`alk_azon` ),
  `dij_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`dijak` (`dij_azon` ),
  `dij_evszam` CHAR(4) NULL DEFAULT NULL ,
  PRIMARY KEY (`alk_k`, `dij_kod`, `dij_evszam`)
)
ENGINE = InnoDB;

CREATE INDEX fk_dijazasok_alkotok ON `szoborpark`.`dijazasok` (`alk_k` ASC) ;
CREATE INDEX fk_dijazasok_dijak ON `szoborpark`.`dijazasok` (`dij_kod` ASC) ;

-- -----------------------------------------------------
-- Table `szoborpark`.`felhasznalok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`felhasznalok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`felhasznalok` (
  `f_azon` VARCHAR(30) NOT NULL ,
  `f_jelszo` VARCHAR(60) NOT NULL ,
  `f_nev` VARCHAR(60) DEFAULT NULL ,
  `f_email` VARCHAR(60) DEFAULT NULL ,  
  `f_aktiv` TINYINT(1) NOT NULL DEFAULT 1 ,
  PRIMARY KEY (`f_azon`) )
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Table `szoborpark`.`fotosok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`fotosok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`fotosok` (
  `fotos_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `fotos_nev` VARCHAR(50) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`fotos_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`fotok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`fotok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`fotok` (
  `foto_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `foto_file` VARCHAR(100) NOT NULL DEFAULT '' ,
  `foto_forras` VARCHAR(30) NULL DEFAULT NULL ,
  `foto_keszites` DATE NULL DEFAULT NULL ,
  `fotos_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`fotosok` (`fotos_azon` ),
  PRIMARY KEY (`foto_azon`) 
)
ENGINE = InnoDB;

CREATE INDEX fk_fotok_fotosok ON `szoborpark`.`fotok` (`fotos_kod` ASC) ;

-- -----------------------------------------------------
-- Table `szoborpark`.`helyek`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`helyek` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`helyek` (
  `helynev_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `helynev_nev` VARCHAR(100) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`helynev_azon`) )
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Table `szoborpark`.`mualkotasok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`mualkotasok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`mualkotasok` (
  `mu_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `mu_cim` VARCHAR(255) NOT NULL DEFAULT '' ,
  `mu_alcim` VARCHAR(255) NULL DEFAULT NULL ,
  `mu_meret` VARCHAR(30) NULL DEFAULT NULL ,
  `mu_evszam` VARCHAR(10) NULL DEFAULT NULL ,
  `helynev_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`helyek` (`helynev_azon` ),
  `cim_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`cimek` (`cim_azon` ),
  `hely_hazszam` VARCHAR(6) NULL DEFAULT NULL ,
  `pontositas` VARCHAR(100) NULL DEFAULT NULL ,
  `mu_leiras` TEXT NULL DEFAULT NULL ,
  `mu_szoveg` TEXT NULL DEFAULT NULL ,
  `mu_forras` TEXT NULL DEFAULT NULL ,
  `mu_edatum` DATE NULL DEFAULT NULL ,
  `mu_aktiv` TINYINT(1) NULL DEFAULT '0' ,
  PRIMARY KEY (`mu_azon`) 
)
ENGINE = InnoDB;

CREATE INDEX fk_mualkotasok_helyek ON `szoborpark`.`mualkotasok` (`helynev_kod` ASC) ;
CREATE INDEX fk_mualkotasok_cimek ON `szoborpark`.`mualkotasok` (`cim_kod` ASC) ;


-- -----------------------------------------------------
-- Table `szoborpark`.`mualkotas_alkotoi`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`mualkotas_alkotoi` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`mualkotas_alkotoi` (
  `mu_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`mualkotasok` (`mu_azon` ),
  `alk_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`alkotok` (`alk_azon` ),
  PRIMARY KEY (`mu_kod`, `alk_kod`) 
)
ENGINE = InnoDB;

CREATE INDEX fk_mualkotas_alkotoi_mualkotasok ON `szoborpark`.`mualkotas_alkotoi` (`mu_kod` ASC) ;
CREATE INDEX fk_mualkotas_alkotoi_alkotok ON `szoborpark`.`mualkotas_alkotoi` (`alk_kod` ASC) ;


-- -----------------------------------------------------
-- Table `szoborpark`.`mualkotas_anyagai`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`mualkotas_anyagai` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`mualkotas_anyagai` (
  `mu_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`mualkotasok` (`mu_azon` ),
  `anyag_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`anyagok` (`anyag_azon` ),
  PRIMARY KEY (`anyag_kod`, `mu_kod`) 
)
ENGINE = InnoDB;

CREATE INDEX fk_mualkotas_anyagai_mualkotasok ON `szoborpark`.`mualkotas_anyagai` (`mu_kod` ASC) ;
CREATE INDEX fk_mualkotas_anyagai_anyagok ON `szoborpark`.`mualkotas_anyagai` (`anyag_kod` ASC) ;


-- -----------------------------------------------------
-- Table `szoborpark`.`mualkotas_fotoi`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`mualkotas_fotoi` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`mualkotas_fotoi` (
  `mu_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`mualkotasok` (`mu_azon` ),
  `foto_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`fotok` (`foto_azon` ),
  PRIMARY KEY (`mu_kod`, `foto_kod`) 
)
ENGINE = InnoDB;

CREATE INDEX fk_mualkotas_fotoi_mualkotasok ON `szoborpark`.`mualkotas_fotoi` (`mu_kod` ASC) ;
CREATE INDEX fk_mualkotas_fotoi_fotok ON `szoborpark`.`mualkotas_fotoi` (`foto_kod` ASC) ;


-- -----------------------------------------------------
-- Table `szoborpark`.`technikak`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`technikak` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`technikak` (
  `technika_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `technika_nev` VARCHAR(50) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`technika_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`mualkotas_technikai`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`mualkotas_technikai` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`mualkotas_technikai` (
  `mu_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`mualkotasok` (`mu_azon` ),
  `technika_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`technikak` (`technika_azon` ),
  PRIMARY KEY (`technika_kod`, `mu_kod`))
ENGINE = InnoDB;

CREATE INDEX fk_mualkotas_technikai_technikak ON `szoborpark`.`mualkotas_technikai` (`technika_kod` ASC) ;
CREATE INDEX fk_mualkotas_technikai_mualkotasok ON `szoborpark`.`mualkotas_technikai` (`mu_kod` ASC) ;


-- -----------------------------------------------------
-- Table `szoborpark`.`tipusok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`tipusok` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`tipusok` (
  `tipus_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `tipus_nev` VARCHAR(50) NOT NULL DEFAULT '' ,
  PRIMARY KEY (`tipus_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`mualkotas_tipusai`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`mualkotas_tipusai` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`mualkotas_tipusai` (
  `mu_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`mualkotasok` (`mu_azon` ),
  `tipus_kod` INT(10) UNSIGNED NOT NULL REFERENCES `szoborpark`.`tipusok` (`tipus_azon` ),
  PRIMARY KEY (`mu_kod`, `tipus_kod`) 
)
ENGINE = InnoDB;

CREATE INDEX fk_mualkotas_tipusai_tipusok ON `szoborpark`.`mualkotas_tipusai` (`tipus_kod` ASC) ;
CREATE INDEX fk_mualkotas_tipusai_mualkotasok ON `szoborpark`.`mualkotas_tipusai` (`mu_kod` ASC) ;


-- -----------------------------------------------------
-- Table `szoborpark`.`vendegkonyv`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`vendegkonyv` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`vendegkonyv` (
  `v_azon` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `v_nev` VARCHAR(50) NOT NULL ,
  `v_email` VARCHAR(50) NULL ,
  `v_uzenet` TEXT NOT NULL ,
  `v_ido` DATETIME NOT NULL ,
  `v_ipcim` VARCHAR(20),
  `v_megjelenik` TINYINT(1) NOT NULL DEFAULT 1 ,
  PRIMARY KEY (`v_azon`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `szoborpark`.`szovegek`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`szovegek` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`szovegek` (
  `szoveg_azon` VARCHAR(50) NOT NULL ,
  `szoveg` TEXT NULL ,
  PRIMARY KEY (`szoveg_azon`) )
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Table `szoborpark`.`menuk`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`menuk` ;

CREATE  TABLE IF NOT EXISTS `szoborpark`.`menuk` (
  `menu_azon` VARCHAR(20) NOT NULL ,
  `menu_nev` VARCHAR(50) NOT NULL ,
  `menu_order` TINYINT NULL ,
  `menu_aktiv` TINYINT(1) NULL DEFAULT 1 ,
  `menu_admin` TINYINT(1) NULL DEFAULT 0 ,
  `menu_guest` TINYINT(1) NULL DEFAULT 0 ,
  PRIMARY KEY (`menu_azon`) )
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Table `szoborpark`.`kepeslapok`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `szoborpark`.`kepeslapok` ;

CREATE TABLE IF NOT EXISTS `szoborpark`.`kepeslapok` (
  `k_azon` DATETIME NOT NULL,
  `k_cemail` VARCHAR(50) NOT NULL,
  `k_cnev` VARCHAR(50) NOT NULL,
  `k_femail` VARCHAR(50) NOT NULL,
  `k_fnev` VARCHAR(50) NOT NULL,
  `k_uzenet` TEXT,
  `k_fotokod` INT(10) UNSIGNED NOT NULL,
  `k_ipcim` VARCHAR(20),
  PRIMARY KEY (`k_azon`) )
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_mualkotasok`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_mualkotasok` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_vendegmenu`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_vendegmenu` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_adminmenu`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_adminmenu` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_felhasznalok`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_felhasznalok` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_mualkotasok_tipusai`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_mualkotasok_tipusai` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_mualkotas_technikai`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_mualkotas_technikai` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_mualkotas_fotoi`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_mualkotas_fotoi` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_mualkotasok_anyagai`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_mualkotasok_anyagai` (`id` INT);

-- -----------------------------------------------------
-- Placeholder table for view `szoborpark`.`nezet_mualkotas_alkotoi`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `szoborpark`.`nezet_mualkotas_alkotoi` (`id` INT);

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_mualkotasok`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_mualkotasok` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_mualkotasok`;
CREATE OR REPLACE  VIEW `szoborpark`.`nezet_mualkotasok` AS
SELECT * FROM mualkotasok
LEFT JOIN cimek on mualkotasok.cim_kod = cimek.cim_azon
LEFT JOIN helyek on mualkotasok.helynev_kod = helyek.helynev_azon
WHERE mu_aktiv = 1;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_vendegmenu`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_vendegmenu` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_vendegmenu`;
CREATE OR REPLACE  VIEW nezet_vendegmenu AS
SELECT * FROM menuk
WHERE menu_aktiv = 1 AND menu_guest = 1
ORDER BY menu_order;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_adminmenu`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_adminmenu` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_adminmenu`;
CREATE OR REPLACE  VIEW nezet_adminmenu AS
SELECT * FROM menuk
WHERE menu_aktiv = 1 AND menu_admin = 1
ORDER BY menu_order;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_felhasznalok`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_felhasznalok` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_felhasznalok`;
CREATE OR REPLACE  VIEW nezet_felhasznalok AS
SELECT * FROM felhasznalok
WHERE f_aktiv = 1;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_mualkotasok_tipusai`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_mualkotasok_tipusai` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_mualkotasok_tipusai`;
CREATE OR REPLACE  VIEW `szoborpark`.`nezet_mualkotasok_tipusai` AS
SELECT * FROM mualkotas_tipusai
LEFT JOIN tipusok ON mualkotas_tipusai.tipus_kod=tipus_azon;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_mualkotas_technikai`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_mualkotas_technikai` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_mualkotas_technikai`;
CREATE OR REPLACE  VIEW `szoborpark`.`nezet_mualkotas_technikai` AS
SELECT * FROM mualkotas_technikai
LEFT JOIN technikak on technika_kod = technika_azon;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_mualkotas_fotoi`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_mualkotas_fotoi` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_mualkotas_fotoi`;
CREATE OR REPLACE  VIEW `szoborpark`.`nezet_mualkotas_fotoi` AS
SELECT * FROM mualkotas_fotoi
LEFT JOIN fotok on mualkotas_fotoi.foto_kod = fotok.foto_azon
LEFT JOIN fotosok on fotok.fotos_kod = fotosok.fotos_azon;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_mualkotasok_anyagai`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_mualkotasok_anyagai` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_mualkotasok_anyagai`;
CREATE OR REPLACE  VIEW `szoborpark`.`nezet_mualkotasok_anyagai` AS
SELECT * FROM mualkotas_anyagai
LEFT JOIN anyagok on mualkotas_anyagai.anyag_kod = anyagok.anyag_azon;

-- -----------------------------------------------------
-- View `szoborpark`.`nezet_mualkotas_alkotoi`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `szoborpark`.`nezet_mualkotas_alkotoi` ;
DROP TABLE IF EXISTS `szoborpark`.`nezet_mualkotas_alkotoi`;
CREATE OR REPLACE  VIEW `szoborpark`.`nezet_mualkotas_alkotoi` AS
SELECT * FROM mualkotas_alkotoi
LEFT JOIN alkotok on mualkotas_alkotoi.alk_kod = alkotok.alk_azon
LEFT JOIN dijazasok on alkotok.alk_azon = dijazasok.alk_k
LEFT JOIN dijak on dijazasok.dij_kod = dijak.dij_azon;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
