Kód:
CREATE TABLE IF NOT EXISTS `galeria` (
`id` int(11) NOT NULL auto_increment,
`publikovat` varchar(250) collate utf8_czech_ci NOT NULL,
`nazov_sk` varchar(200) collate utf8_czech_ci NOT NULL,
`nazov_en` varchar(200) collate utf8_czech_ci NOT NULL,
`nazov_de` varchar(200) collate utf8_czech_ci NOT NULL,
`obsah_sk` text collate utf8_czech_ci NOT NULL,
`obsah_en` text collate utf8_czech_ci NOT NULL,
`obsah_de` text collate utf8_czech_ci NOT NULL,
`obrazok` varchar(250) collate utf8_czech_ci NOT NULL,
`datum` datetime NOT NULL,
`datum_uprav` datetime NOT NULL,
`upravil` int(10) NOT NULL,
PRIMARY KEY (`id`)
)
CREATE TABLE IF NOT EXISTS `galeria_clanky` (
`id` int(11) NOT NULL auto_increment,
`clanok_id` int(11) NOT NULL,
`galeria_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
INSERT INTO `galeria_clanky` (`id`, `clanok_id`, `galeria_id`) VALUES
(1, 1, 1)