text: -- phpMyAdmin SQL Dump
  -- version 4.3.13.1
  -- http://www.phpmyadmin.net
  --
  -- Host: localhost
  -- Generation Time: Oct 15, 2016 at 08:13 PM
  -- Server version: 5.6.25
  -- PHP Version: 5.3.29
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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 utf8 */;
  
  --
  -- Database: `quiz`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `admin`
  --
  
  CREATE TABLE IF NOT EXISTS `admin` (
    `id` int(100) NOT NULL,
    `username` varchar(50) NOT NULL,
    `password` varchar(500) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `admin`
  --
  
  INSERT INTO `admin` (`id`, `username`, `password`) VALUES
  (1, 'sonudoo', '1234567890');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `answer`
  --
  
  CREATE TABLE IF NOT EXISTS `answer` (
    `id` int(100) NOT NULL,
    `qid` text NOT NULL,
    `ansid` text NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `answer`
  --
  
  INSERT INTO `answer` (`id`, `qid`, `ansid`) VALUES
  (1, '58027e82e62e3', '58027e82f2412'),
  (2, '58027e833dd54', '58027e8347514'),
  (3, '58027e8371483', '58027e838f19a');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `feedback`
  --
  
  CREATE TABLE IF NOT EXISTS `feedback` (
    `id` text NOT NULL,
    `name` varchar(50) NOT NULL,
    `username` varchar(50) NOT NULL,
    `subject` varchar(500) NOT NULL,
    `feedback` varchar(500) NOT NULL,
    `date` date NOT NULL,
    `time` varchar(50) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `history`
  --
  
  CREATE TABLE IF NOT EXISTS `history` (
    `id` int(100) NOT NULL,
    `username` varchar(50) NOT NULL,
    `eid` text NOT NULL,
    `score` int(11) NOT NULL,
    `level` int(11) NOT NULL,
    `correct` int(11) NOT NULL,
    `wrong` int(11) NOT NULL,
    `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `timestamp` bigint(50) NOT NULL,
    `status` varchar(40) NOT NULL,
    `score_updated` varchar(10) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `history`
  --
  
  INSERT INTO `history` (`id`, `username`, `eid`, `score`, `level`, `correct`, `wrong`, `date`, `timestamp`, `status`,`score_updated`) VALUES
  (1, 'sonudoo', '5802790f793b1', 12, 3, 3, 0, '2016-10-15 19:11:55', 1476558671, 'finished','false');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `options`
  --
  
  CREATE TABLE IF NOT EXISTS `options` (
    `id` int(100) NOT NULL,
    `qid` varchar(50) NOT NULL,
    `option` varchar(5000) NOT NULL,
    `optionid` text NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `options`
  --
  
  INSERT INTO `options` (`id`, `qid`, `option`, `optionid`) VALUES
  (1, '58027e82e62e3', 'Yes', '58027e82f2412'),
  (2, '58027e82e62e3', 'No', '58027e82f2427'),
  (3, '58027e82e62e3', 'Don''t want to', '58027e82f2433'),
  (4, '58027e82e62e3', 'Why should I', '58027e82f243d'),
  (5, '58027e833dd54', 'sonudoo', '58027e8347505'),
  (6, '58027e833dd54', 'sunnygkp10', '58027e8347514'),
  (7, '58027e833dd54', 'markzuckerberg', '58027e834751b'),
  (8, '58027e833dd54', 'me', '58027e8347521'),
  (9, '58027e8371483', 'sonudoo', '58027e838f19a'),
  (10, '58027e8371483', 'sunnygkp10', '58027e838f1b0'),
  (11, '58027e8371483', 'me', '58027e838f1ba'),
  (12, '58027e8371483', 'markzuckerberg', '58027e838f1c4');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `questions`
  --
  
  CREATE TABLE IF NOT EXISTS `questions` (
    `id` int(100) NOT NULL,
    `eid` text NOT NULL,
    `qid` text NOT NULL,
    `qns` text NOT NULL,
    `choice` int(10) NOT NULL,
    `sn` int(11) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `questions`
  --
  
  INSERT INTO `questions` (`id`, `eid`, `qid`, `qns`, `choice`, `sn`) VALUES
  (1, '5802790f793b1', '58027e82e62e3', 'Have you read the README file?', 4, 1),
  (2, '5802790f793b1', '58027e833dd54', 'Who is the Original creator of this quizzing site?', 4, 2),
  (3, '5802790f793b1', '58027e8371483', 'Who improved the original version of this quizzing site?', 4, 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `quiz`
  --
  
  CREATE TABLE IF NOT EXISTS `quiz` (
    `id` int(100) NOT NULL,
    `eid` text NOT NULL,
    `title` varchar(100) NOT NULL,
    `correct` int(11) NOT NULL,
    `wrong` int(11) NOT NULL,
    `total` int(11) NOT NULL,
    `time` bigint(20) NOT NULL,
    `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `status` varchar(10) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `quiz`
  --
  
  INSERT INTO `quiz` (`id`, `eid`, `title`, `correct`, `wrong`, `total`, `time`, `date`, `status`) VALUES
  (1, '5802790f793b1', 'Sample Quiz', 4, 1, 3, 3, '2016-10-15 19:09:11', 'enabled');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `rank`
  --
  
  CREATE TABLE IF NOT EXISTS `rank` (
    `id` int(100) NOT NULL,
    `username` varchar(50) NOT NULL,
    `score` int(11) NOT NULL,
    `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `rank`
  --
  
  INSERT INTO `rank` (`id`, `username`, `score`, `time`) VALUES
  (1, 'sonudoo', 12, '2016-10-15 19:11:55');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE IF NOT EXISTS `user` (
    `id` int(100) NOT NULL,
    `name` varchar(50) NOT NULL,
    `rollno` varchar(20) NOT NULL,
    `branch` varchar(20) NOT NULL,
    `gender` varchar(5) NOT NULL,
    `username` varchar(50) NOT NULL,
    `phno` bigint(20) NOT NULL,
    `password` varchar(50) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `name`, `rollno`, `branch`, `gender`, `username`, `phno`, `password`) VALUES
  (1, 'Sushant Kumar Gupta', 'BE/10001/15', 'CSE', 'M', 'sonudoo', 1234567890, 'e807f1fcf82d132f9bb018ca6738a19f');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_answer`
  --
  
  CREATE TABLE IF NOT EXISTS `user_answer` (
    `id` int(100) NOT NULL,
    `qid` varchar(50) NOT NULL,
    `ans` varchar(50) NOT NULL,
    `correctans` varchar(50) NOT NULL,
    `eid` varchar(50) NOT NULL,
    `username` varchar(50) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user_answer`
  --
  
  INSERT INTO `user_answer` (`id`, `qid`, `ans`, `correctans`, `eid`, `username`) VALUES
  (1, '58027e82e62e3', '58027e82f2412', '58027e82f2412', '5802790f793b1', 'sonudoo'),
  (2, '58027e833dd54', '58027e8347514', '58027e8347514', '5802790f793b1', 'sonudoo'),
  (3, '58027e8371483', '58027e838f19a', '58027e838f19a', '5802790f793b1', 'sonudoo');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `admin`
  --
  ALTER TABLE `admin`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `answer`
  --
  ALTER TABLE `answer`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `history`
  --
  ALTER TABLE `history`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `options`
  --
  ALTER TABLE `options`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `questions`
  --
  ALTER TABLE `questions`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `quiz`
  --
  ALTER TABLE `quiz`
    ADD UNIQUE KEY `id` (`id`);
  
  --
  -- Indexes for table `rank`
  --
  ALTER TABLE `rank`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`username`), ADD UNIQUE KEY `username` (`username`), ADD UNIQUE KEY `id` (`id`);
  
  --
  -- Indexes for table `user_answer`
  --
  ALTER TABLE `user_answer`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `admin`
  --
  ALTER TABLE `admin`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `answer`
  --
  ALTER TABLE `answer`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
  --
  -- AUTO_INCREMENT for table `history`
  --
  ALTER TABLE `history`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `options`
  --
  ALTER TABLE `options`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13;
  --
  -- AUTO_INCREMENT for table `questions`
  --
  ALTER TABLE `questions`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
  --
  -- AUTO_INCREMENT for table `quiz`
  --
  ALTER TABLE `quiz`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `rank`
  --
  ALTER TABLE `rank`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `user_answer`
  --
  ALTER TABLE `user_answer`
    MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
  /*!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 */;
  