-
Notifications
You must be signed in to change notification settings - Fork 1
/
phppoll.sql
112 lines (91 loc) · 2.51 KB
/
phppoll.sql
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2024 at 11:32 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12
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 */;
--
-- Database: `phppoll`
--
-- --------------------------------------------------------
--
-- Table structure for table `polls`
--
CREATE TABLE `polls` (
`id` int(11) NOT NULL,
`title` text NOT NULL,
`description` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
--
-- Dumping data for table `polls`
--
INSERT INTO `polls` (`id`, `title`, `description`) VALUES
(1, 'meru university ', 'chair person'),
(2, 'school of computing and informatics ', 'school representative'),
(3, 'school of computing and informatics ', 'mens representative '),
(4, 'school of business and economics ', 'school rep');
-- --------------------------------------------------------
--
-- Table structure for table `poll_answers`
--
CREATE TABLE `poll_answers` (
`id` int(11) NOT NULL,
`poll_id` int(11) NOT NULL,
`title` text NOT NULL,
`votes` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
--
-- Dumping data for table `poll_answers`
--
INSERT INTO `poll_answers` (`id`, `poll_id`, `title`, `votes`) VALUES
(1, 1, 'harun', 0),
(2, 1, 'joseph', 2),
(3, 1, 'david', 0),
(4, 2, 'mary', 0),
(5, 2, 'diana', 0),
(6, 2, 'melisa', 0),
(7, 3, 'muricho', 0),
(8, 3, 'kevin', 0),
(9, 3, 'omubasa', 0),
(10, 4, 'kevin', 0),
(11, 4, 'alex', 0),
(12, 4, 'maina', 0);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `polls`
--
ALTER TABLE `polls`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `poll_answers`
--
ALTER TABLE `poll_answers`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `polls`
--
ALTER TABLE `polls`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `poll_answers`
--
ALTER TABLE `poll_answers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
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 */;