-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `expenses`
--

-- --------------------------------------------------------

--
-- Table structure for table `budget`
--

CREATE TABLE IF NOT EXISTS `budget` (
  `budget_id` int NOT NULL,
  `amount` double NOT NULL,
  `startmonth` date NOT NULL,
  `endmonth` date NOT NULL,
  PRIMARY KEY (`budget_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `category`
--

CREATE TABLE IF NOT EXISTS `category` (
  `categoryid` int NOT NULL,
  `categoryname` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  PRIMARY KEY (`categoryid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `expense`
--

CREATE TABLE IF NOT EXISTS `expense` (
  `expenseid` int NOT NULL,
  `categoryid` int NOT NULL,
  `item` varchar(255) NOT NULL,
  `price` double NOT NULL,
  `details` text NOT NULL,
  `added_on` date NOT NULL,
  PRIMARY KEY (`expenseid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `UserID` int NOT NULL AUTO_INCREMENT COMMENT 'AUTO_INCREMENT',
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `confirmpassword` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` int NOT NULL,
  `dateofbirth` date NOT NULL,
  PRIMARY KEY (`UserID`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`UserID`, `username`, `password`, `confirmpassword`, `email`, `phone`, `dateofbirth`) VALUES
(1, 'james tan', 'yy1', 'yy1', 'cy01544@gmail.com', 0, '2000-02-02'),
(2, 'james', 'yy12', 'yy12', 'yangyunxuan2003@hotmail.com', 16, '2000-02-02'),
(3, 'james7', 'yy12', 'yy12', 'yangyunxuan2003@hotmail.com', 16, '2000-02-02'),
(4, '', '', '', '', 0, '0000-00-00'),
(5, 'tt', 'p78', 'p78', 'tt@gmail.com', 16, '1977-02-04'),
(6, 'pp', 'yyt123', 'yyt123', 'pp78@yahoo.com', 136985231, '2003-03-03'),
(7, 'pT', 'JJI1', 'JJI1', 'ppT78@yahoo.com', 136985278, '2006-06-06');
COMMIT;

