From 5f76c024aba45b7e061fcbbf55499219c2f60197 Mon Sep 17 00:00:00 2001 From: Jakub Kaczmarek Date: Mon, 1 Feb 2021 23:02:38 +0100 Subject: [PATCH] =?UTF-8?q?Prze=C5=9Blij=20pliki=20do=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.sql | 237 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 test.sql diff --git a/test.sql b/test.sql new file mode 100644 index 0000000..c6e2ea7 --- /dev/null +++ b/test.sql @@ -0,0 +1,237 @@ +-- phpMyAdmin SQL Dump +-- version 5.0.4 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Czas generowania: 01 Lut 2021, 23:02 +-- Wersja serwera: 10.4.17-MariaDB +-- Wersja PHP: 7.4.13 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Baza danych: `test` +-- + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `pytania` +-- + +CREATE TABLE `pytania` ( + `id_pytania` int(20) NOT NULL, + `Pytanie` varchar(100) NOT NULL, + `P_odp` varchar(20) NOT NULL, + `B_odp_1` varchar(20) NOT NULL, + `B_odp_2` varchar(20) NOT NULL, + `B_odp_3` varchar(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Zrzut danych tabeli `pytania` +-- + +INSERT INTO `pytania` (`id_pytania`, `Pytanie`, `P_odp`, `B_odp_1`, `B_odp_2`, `B_odp_3`) VALUES +(1, 'Przykladowe pytanie 1', 'a', 'b', 'c', 'd'), +(2, 'Przykladowe pytanie 2', 'a', 'b', 'c', 'd'), +(3, 'Przykladowe pytanie 3', 'a', 'b', 'c', 'd'), +(4, 'Przykladowe pytanie 4', 'a', 'b', 'c', 'd'), +(5, 'Przykladowe pytanie 5', 'a', 'b', 'c', 'd'), +(20, 'p', 'odp', 'odp', 'odp', 'odp'), +(39, 'a', 'a', 'a', 'a', 'a'), +(40, 'a', 'a', 'a', 'a', 'a'), +(41, 'a', 'a', 'a', 'a', 'a'), +(42, 'b', 'b', 'b', 'b', 'b'), +(43, 'a b', ' a', 'a', 'a', 'a'); + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `pytania_quiz` +-- + +CREATE TABLE `pytania_quiz` ( + `id_quiz_pytania` int(20) NOT NULL, + `quiz_nazwa` varchar(20) NOT NULL, + `pytanie` varchar(20) NOT NULL, + `p_odp` varchar(20) NOT NULL, + `b_odp_1` varchar(20) NOT NULL, + `b_odp_2` varchar(20) NOT NULL, + `b_odp_3` varchar(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Zrzut danych tabeli `pytania_quiz` +-- + +INSERT INTO `pytania_quiz` (`id_quiz_pytania`, `quiz_nazwa`, `pytanie`, `p_odp`, `b_odp_1`, `b_odp_2`, `b_odp_3`) VALUES +(1, '', '', '', '', '', ''), +(2, '', '', '', '', '', ''), +(3, '', '', '', '', '', ''), +(4, 'a', '', '', '', '', ''), +(5, 'a', '', '', '', '', ''), +(6, 'a', '', '', '', '', ''), +(7, 'a', '', '', '', '', ''), +(8, 'a', '', '', '', '', ''); + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `quiz` +-- + +CREATE TABLE `quiz` ( + `id_quizu` int(20) NOT NULL, + `quiz_nazwa` varchar(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Zrzut danych tabeli `quiz` +-- + +INSERT INTO `quiz` (`id_quizu`, `quiz_nazwa`) VALUES +(7, 'a'), +(8, 'a'), +(14, ''), +(15, 'a'); + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `users` +-- + +CREATE TABLE `users` ( + `id_user` int(11) NOT NULL, + `Nazwa` varchar(200) NOT NULL, + `Typ` varchar(200) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Zrzut danych tabeli `users` +-- + +INSERT INTO `users` (`id_user`, `Nazwa`, `Typ`) VALUES +(1, 'Adam', 'Admin'), +(2, 'Lucy', 'Admin'), +(3, 'Kasia', 'user'), +(4, 'Pawel', 'user'), +(5, 'Jacob-PC1', 'admin'); + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `wyniki` +-- + +CREATE TABLE `wyniki` ( + `id_wynik` int(20) NOT NULL, + `quiz_nazwa` varchar(20) NOT NULL, + `user_nazwa` varchar(20) NOT NULL, + `l_pkt` int(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Zrzut danych tabeli `wyniki` +-- + +INSERT INTO `wyniki` (`id_wynik`, `quiz_nazwa`, `user_nazwa`, `l_pkt`) VALUES +(1, 'quiz1', 'Adam', 5), +(2, 'quiz2', 'Pawel', 5), +(3, 'quiz3', 'Karo', 6), +(4, 'quiz4', 'Anna', 3), +(5, 'quiz5', 'Jan', 1), +(6, 'quiz1', 'Adam', 0), +(7, 'quiz2', 'Pawel', 0), +(8, 'quiz3', 'Karo', 0), +(9, 'quiz4', 'Anna', 0), +(10, 'quiz5', 'Jan', 0), +(11, 'quiz1', 'Adam', 5), +(12, 'quiz2', 'Pawel', 5), +(13, 'quiz1', 'Adam', 5), +(14, 'quiz2', 'Pawel', 5), +(15, 'quiz3', 'Karo', 6), +(16, 'quiz4', 'Anna', 3), +(17, 'quiz5', 'Jan', 1); + +-- +-- Indeksy dla zrzutów tabel +-- + +-- +-- Indeksy dla tabeli `pytania` +-- +ALTER TABLE `pytania` + ADD PRIMARY KEY (`id_pytania`); + +-- +-- Indeksy dla tabeli `pytania_quiz` +-- +ALTER TABLE `pytania_quiz` + ADD PRIMARY KEY (`id_quiz_pytania`); + +-- +-- Indeksy dla tabeli `quiz` +-- +ALTER TABLE `quiz` + ADD PRIMARY KEY (`id_quizu`); + +-- +-- Indeksy dla tabeli `users` +-- +ALTER TABLE `users` + ADD PRIMARY KEY (`id_user`); + +-- +-- Indeksy dla tabeli `wyniki` +-- +ALTER TABLE `wyniki` + ADD PRIMARY KEY (`id_wynik`); + +-- +-- AUTO_INCREMENT dla zrzuconych tabel +-- + +-- +-- AUTO_INCREMENT dla tabeli `pytania` +-- +ALTER TABLE `pytania` + MODIFY `id_pytania` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44; + +-- +-- AUTO_INCREMENT dla tabeli `pytania_quiz` +-- +ALTER TABLE `pytania_quiz` + MODIFY `id_quiz_pytania` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; + +-- +-- AUTO_INCREMENT dla tabeli `quiz` +-- +ALTER TABLE `quiz` + MODIFY `id_quizu` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT dla tabeli `users` +-- +ALTER TABLE `users` + MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; + +-- +-- AUTO_INCREMENT dla tabeli `wyniki` +-- +ALTER TABLE `wyniki` + MODIFY `id_wynik` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;