Prześlij pliki do ''
This commit is contained in:
parent
c0ea134326
commit
b722fda022
@ -4,7 +4,7 @@
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title></title>
|
||||
<title>recepcjonista</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Recepcjonista</h1>
|
||||
@ -15,17 +15,17 @@
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
session_start();
|
||||
if(isset($_POST['submit']))
|
||||
{
|
||||
header('Location: '.$_SERVER['REQUEST_URI']);
|
||||
}
|
||||
$godziny=[];
|
||||
$polaczenie=mysqli_connect('localhost','root','','rejestracja');
|
||||
$polaczenie=mysqli_connect('localhost','root','','rejestracja') or die ("nieprawidłowy użytkownik");
|
||||
$zapytanie="SELECT `dzien`,`godzina`, `stan`, `imie`, `nazwisko`, `id` FROM `wizyty` INNER JOIN `pacjenci` WHERE `dzien`='2020-12-13' AND pacjenci.telefon=wizyty.telefon ORDER BY `godzina`";
|
||||
$wynik=mysqli_query($polaczenie,$zapytanie)or die(" bład zapytania1!");
|
||||
echo '<form method="POST" id="formularz2">';
|
||||
print "<div id= 'tabele'>";
|
||||
/*print '<form method="post" >';*/
|
||||
print "<table class='tabela'>";
|
||||
print "<br>";
|
||||
$tab1=[];
|
||||
|
185
rejestracja.sql
Normal file
185
rejestracja.sql
Normal file
@ -0,0 +1,185 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.0.1
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Czas generowania: 24 Lut 2021, 14:50
|
||||
-- Wersja serwera: 10.4.11-MariaDB
|
||||
-- Wersja PHP: 7.4.3
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET AUTOCOMMIT = 0;
|
||||
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: `rejestracja`
|
||||
--
|
||||
CREATE DATABASE IF NOT EXISTS `rejestracja` DEFAULT CHARACTER SET utf16 COLLATE utf16_polish_ci;
|
||||
USE `rejestracja`;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struktura tabeli dla tabeli `customer_id`
|
||||
--
|
||||
|
||||
CREATE TABLE `customer_id` (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used',
|
||||
`increment` bigint(21) NOT NULL COMMENT 'increment value',
|
||||
`cache_size` bigint(21) UNSIGNED NOT NULL,
|
||||
`cycle_option` tinyint(1) UNSIGNED NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed',
|
||||
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
-- Zrzut danych tabeli `customer_id`
|
||||
--
|
||||
|
||||
INSERT INTO `customer_id` (`next_not_cached_value`, `minimum_value`, `maximum_value`, `start_value`, `increment`, `cache_size`, `cycle_option`, `cycle_count`) VALUES(1, 1, 9223372036854775806, 1, 1, 10, 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struktura tabeli dla tabeli `id`
|
||||
--
|
||||
|
||||
CREATE TABLE `id` (
|
||||
`next_not_cached_value` bigint(21) NOT NULL,
|
||||
`minimum_value` bigint(21) NOT NULL,
|
||||
`maximum_value` bigint(21) NOT NULL,
|
||||
`start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used',
|
||||
`increment` bigint(21) NOT NULL COMMENT 'increment value',
|
||||
`cache_size` bigint(21) UNSIGNED NOT NULL,
|
||||
`cycle_option` tinyint(1) UNSIGNED NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed',
|
||||
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
-- Zrzut danych tabeli `id`
|
||||
--
|
||||
|
||||
INSERT INTO `id` (`next_not_cached_value`, `minimum_value`, `maximum_value`, `start_value`, `increment`, `cache_size`, `cycle_option`, `cycle_count`) VALUES(1, 1, 9223372036854775806, 1, 1, 10, 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struktura tabeli dla tabeli `lekarze`
|
||||
--
|
||||
|
||||
CREATE TABLE `lekarze` (
|
||||
`ID` int(11) NOT NULL,
|
||||
`imie` varchar(20) COLLATE utf16_polish_ci NOT NULL,
|
||||
`nazwisko` varchar(20) COLLATE utf16_polish_ci NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_polish_ci;
|
||||
|
||||
--
|
||||
-- Zrzut danych tabeli `lekarze`
|
||||
--
|
||||
|
||||
INSERT INTO `lekarze` (`ID`, `imie`, `nazwisko`) VALUES(1, 'Michał', 'Wawrzyniak');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struktura tabeli dla tabeli `pacjenci`
|
||||
--
|
||||
|
||||
CREATE TABLE `pacjenci` (
|
||||
`imie` varchar(25) COLLATE utf16_polish_ci NOT NULL,
|
||||
`nazwisko` varchar(25) COLLATE utf16_polish_ci NOT NULL,
|
||||
`telefon` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_polish_ci;
|
||||
|
||||
--
|
||||
-- Zrzut danych tabeli `pacjenci`
|
||||
--
|
||||
|
||||
INSERT INTO `pacjenci` (`imie`, `nazwisko`, `telefon`) VALUES('Cooper', 'Cadman', 29736508);
|
||||
INSERT INTO `pacjenci` (`imie`, `nazwisko`, `telefon`) VALUES('Lionel', 'Hayden', 56259538);
|
||||
INSERT INTO `pacjenci` (`imie`, `nazwisko`, `telefon`) VALUES('Yvonne', 'Autumn', 58779339);
|
||||
INSERT INTO `pacjenci` (`imie`, `nazwisko`, `telefon`) VALUES('Garth', 'Dara', 71088650);
|
||||
INSERT INTO `pacjenci` (`imie`, `nazwisko`, `telefon`) VALUES('Jayme', 'Ivor', 126958727);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Struktura tabeli dla tabeli `wizyty`
|
||||
--
|
||||
|
||||
CREATE TABLE `wizyty` (
|
||||
`ID` int(2) NOT NULL,
|
||||
`ID_lekarz` int(11) NOT NULL,
|
||||
`telefon` int(9) NOT NULL,
|
||||
`dzien` date NOT NULL,
|
||||
`godzina` time NOT NULL,
|
||||
`stan` int(1) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_polish_ci;
|
||||
|
||||
--
|
||||
-- Zrzut danych tabeli `wizyty`
|
||||
--
|
||||
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(1, 1, 29736508, '2020-12-13', '11:00:00', 0);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(2, 1, 56259538, '2020-12-13', '12:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(3, 1, 58779339, '2020-12-13', '13:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(4, 1, 71088650, '2020-12-14', '11:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(8, 1, 126958727, '2020-12-13', '17:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(9, 1, 56259538, '2020-12-13', '10:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(10, 1, 71088650, '2020-12-14', '13:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(11, 1, 126958727, '2020-12-14', '17:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(30, 1, 71088650, '2020-12-15', '11:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(31, 1, 56259538, '2020-12-15', '13:00:00', 0);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(32, 1, 126958727, '2020-12-15', '17:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(33, 1, 71088650, '2020-12-15', '11:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(36, 1, 29736508, '2020-12-15', '16:00:00', 0);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(37, 1, 29736508, '2020-12-13', '16:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(38, 1, 29736508, '2020-12-14', '14:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(39, 1, 29736508, '2020-12-15', '10:00:00', 1);
|
||||
INSERT INTO `wizyty` (`ID`, `ID_lekarz`, `telefon`, `dzien`, `godzina`, `stan`) VALUES(40, 1, 29736508, '2020-12-13', '10:00:00', 1);
|
||||
|
||||
--
|
||||
-- Indeksy dla zrzutów tabel
|
||||
--
|
||||
|
||||
--
|
||||
-- Indeksy dla tabeli `lekarze`
|
||||
--
|
||||
ALTER TABLE `lekarze`
|
||||
ADD PRIMARY KEY (`ID`);
|
||||
|
||||
--
|
||||
-- Indeksy dla tabeli `pacjenci`
|
||||
--
|
||||
ALTER TABLE `pacjenci`
|
||||
ADD PRIMARY KEY (`telefon`);
|
||||
|
||||
--
|
||||
-- Indeksy dla tabeli `wizyty`
|
||||
--
|
||||
ALTER TABLE `wizyty`
|
||||
ADD PRIMARY KEY (`ID`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT dla tabeli `wizyty`
|
||||
--
|
||||
ALTER TABLE `wizyty`
|
||||
MODIFY `ID` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;
|
||||
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 */;
|
Loading…
Reference in New Issue
Block a user