-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Lun 12 Octobre 2009 à 02:20
-- Version du serveur: 5.1.33
-- Version de PHP: 5.2.9-2


--
-- Base de données: `tykayn`
--

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

--
-- Structure de la table `tk_sondages`
--

CREATE TABLE IF NOT EXISTS `tk_sondages` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `date` datetime NOT NULL,
  `id_sondage` varchar(5) NOT NULL,
  `titre_sondage` varchar(300) NOT NULL,
  `sous_titre_sondage` varchar(300) NOT NULL,
  `ordre_questions` varchar(100) NOT NULL,
  `nature_q` varchar(2) NOT NULL,
  `texte_q` varchar(255) NOT NULL,
  `contenu_q` text NOT NULL,
  `pour_le_sondage_numero` varchar(5) NOT NULL,
  `num_q` varchar(5) NOT NULL,
  `reponse` text NOT NULL,
  `adress-ip` int(20) NOT NULL,
  `authuserID` varchar(500) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

--
-- Contenu de la table `tk_sondages`
--

INSERT INTO `tk_sondages` (`id`, `date`, `id_sondage`, `titre_sondage`, `sous_titre_sondage`, `ordre_questions`, `nature_q`, `texte_q`, `contenu_q`, `pour_le_sondage_numero`, `num_q`, `reponse`, `adress-ip`, `authuserID`) VALUES
(1, '2009-10-12 02:09:56', '1', 'vos gouts en cuisine', 'miam youpi!', ' DP, DS, DA, V, ON, T, N, C, S, G', '', '', '', '', '', '', 0, ''),
(2, '2009-10-12 02:09:56', '', '', '', '', 'DP', 'Votre pseudo', '', '1', '', '', 0, ''),
(3, '2009-10-12 02:09:56', '', '', '', '', 'DS', 'Votre sexe', '1', '', '', '', 0, ''),
(4, '2009-10-12 02:09:56', '', '', '', '', 'DA', 'Votre Ã¢ge', '1', '', '', '', 0, ''),
(5, '2009-10-12 02:09:56', '', '', '', '', 'T', 'lieu de naissance', '', '1', '', '', 0, ''),
(6, '2009-10-12 02:09:56', '', '', '', '', 'T', 'nb d''enfants', '', '1', '', '', 0, ''),
(7, '2009-10-12 02:09:56', '', '', '', '', 'T', 'nb d''enfants', '', '1', '', '', 0, ''),
(8, '2009-10-12 02:09:56', '', '', '', '', 'T', 'vous aimez les frites?', '', '1', '', '', 0, ''),
(9, '2009-10-12 02:09:56', '', '', '', '', 'T', 'pays', 'France, Belgique, ailleurs', '1', '', '', 0, ''),
(10, '2009-10-12 02:09:56', '', '', '', '', 'T', 'cheveux', 'blonds,bruns,bleus', '1', '', '', 0, ''),
(11, '2009-10-12 02:09:56', '', '', '', '', 'T', 'estime de soi', '1', '1', '', '', 0, '');





----------------------------------------- ancienne version:---------------










CREATE TABLE `tk_tbl_sondage` (
`id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`titre` VARCHAR( 255 ) NOT NULL ,
`question` VARCHAR( 255 ) NOT NULL ,
`premier_id_option` INT( 4 ) NOT NULL ,
`dernier_id_option` INT( 4 ) NOT NULL ,
`premier_id_reponse` INT( 4 ) NOT NULL ,
`dernier_id_reponse` INT( 4 ) NOT NULL ,
`date` DATETIME NOT NULL
) ENGINE = innodb;

CREATE TABLE `tk_tbl_options` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`question` VARCHAR( 255 ) NOT NULL ,
`oui_non` BOOL NULL ,
`radio` SMALLINT( 2 ) NULL ,
`varchar` TEXT NULL ,
`nombres` INT( 12 ) NULL ,
`id_sondage` INT( 4 ) NOT NULL
) ENGINE = innodb;

CREATE TABLE `tk_tbl_reponse` (
`id_reponse` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`oui_non_reponse` BOOL NULL ,
`radio_reponse` SMALLINT( 2 ) NULL ,
`varchar` TEXT NULL ,
`nombres_reponse` INT( 12 ) NULL ,
`date_reponse` DATETIME NOT NULL
) ENGINE = innodb;