-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 22, 2019 at 03:53 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10

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 */;

--
-- Database: `webd153`
--

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

--
-- Table structure for table `clients`
--

CREATE TABLE `clients` (
  `client_id` int(5) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `company` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(20) NOT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `URL` varchar(255) NOT NULL,
  `contact_by` enum('Contact Phone','Contact Email') NOT NULL,
  `other` varchar(255) NOT NULL,
  `comments` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `clients`
--

INSERT INTO `clients` (`client_id`, `name`, `company`, `email`, `phone`, `city`, `state`, `URL`, `contact_by`, `other`, `comments`) VALUES
(1, 'John Smith', 'Smith & Smith', 'j.smith@email.com', '123-456-7890', 'San Diego', 'CA', 'jsmith.com', 'Contact Phone', 'blah', 'blah blah'),
(2, 'Bob Bobson', 'Bob Inc.', 'bob@bob.com', '2345678901', 'San Diego', 'CA', 'bob.com', 'Contact Email', 'blah', 'blah blah'),
(3, 'Kris Secor', 'Mesq', 'kdsecor@gmail.com', '5551212', 'San Diego', 'Ca', 'mm214.com', 'Contact Phone', 'Other', 'Comments'),
(8, 'Madeline trevathan', 'Mesa', 'mt@gmail.com', '5551212', 'ranchob N', 'ca', 'mt.com', 'Contact Phone', 'Other', 'Comments'),
(9, 'Amy Lee', 'amy\'s cookie shop', 'amy@cookieshop.com', '123345656', 'San Diego', 'ca', 'cookieshop.com', 'Contact Phone', 'Other', 'Comments');

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

--
-- Table structure for table `client_needs`
--

CREATE TABLE `client_needs` (
  `client_id` int(5) UNSIGNED NOT NULL,
  `skills_id` int(5) UNSIGNED NOT NULL,
  `projectid` int(5) NOT NULL,
  `timeofrequest` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `client_needs`
--

INSERT INTO `client_needs` (`client_id`, `skills_id`, `projectid`, `timeofrequest`) VALUES
(1, 4, 0, '0000-00-00'),
(1, 5, 0, '0000-00-00'),
(2, 4, 0, '0000-00-00'),
(2, 17, 0, '0000-00-00'),
(3, 1, 0, '0000-00-00'),
(3, 2, 0, '0000-00-00'),
(3, 3, 0, '0000-00-00'),
(8, 1, 0, '0000-00-00'),
(8, 3, 0, '0000-00-00'),
(9, 2, 0, '0000-00-00'),
(9, 3, 0, '0000-00-00'),
(9, 7, 0, '0000-00-00'),
(9, 8, 0, '0000-00-00'),
(9, 11, 0, '0000-00-00'),
(9, 12, 0, '0000-00-00'),
(9, 14, 1, '2019-03-06'),
(9, 15, 0, '0000-00-00'),
(9, 18, 1, '2019-03-21'),
(9, 19, 0, '0000-00-00'),
(9, 20, 0, '0000-00-00');

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

--
-- Table structure for table `skills`
--

CREATE TABLE `skills` (
  `skills_id` int(5) UNSIGNED NOT NULL,
  `skill` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `skills`
--

INSERT INTO `skills` (`skills_id`, `skill`) VALUES
(1, 'Site Design'),
(2, 'Redesign'),
(3, 'Store'),
(4, 'Marketing'),
(5, 'Maintenance'),
(6, 'html/dhtml'),
(7, 'perl/cgi'),
(8, 'java'),
(9, 'asp'),
(10, 'xml'),
(11, 'access'),
(12, 'sql'),
(13, 'sybase'),
(14, 'oracle'),
(15, 'flash'),
(16, 'quicktime'),
(17, 'media player'),
(18, 'real'),
(19, 'marketing collateral'),
(20, 'logos'),
(21, 'annual reports'),
(22, 'packaging');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `clients`
--
ALTER TABLE `clients`
  ADD PRIMARY KEY (`client_id`);

--
-- Indexes for table `client_needs`
--
ALTER TABLE `client_needs`
  ADD UNIQUE KEY `client_id_2` (`client_id`,`skills_id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `skills_id` (`skills_id`);

--
-- Indexes for table `skills`
--
ALTER TABLE `skills`
  ADD PRIMARY KEY (`skills_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `clients`
--
ALTER TABLE `clients`
  MODIFY `client_id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `skills`
--
ALTER TABLE `skills`
  MODIFY `skills_id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `client_needs`
--
ALTER TABLE `client_needs`
  ADD CONSTRAINT `client_needs_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`client_id`),
  ADD CONSTRAINT `client_needs_ibfk_2` FOREIGN KEY (`skills_id`) REFERENCES `skills` (`skills_id`);
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 */;
