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
|
CREATE TABLE `calendrier` (
`IDagenda` tinyint(4) NOT NULL auto_increment,
`intitulé` text NOT NULL,
`partagenb` tinyint(4) NOT NULL default '0',
KEY `ID` (`IDagenda`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;
**********************contenu de table calendrier*****
INSERT INTO `calendrier` (`IDagenda`, `intitulé`, `partagenb`) VALUES (1, 'agenda1', 2),
(2, 'agenda2', 1);
*************************table1************
CREATE TABLE `table1` (
`ID` tinyint(4) NOT NULL auto_increment,
`nom` text NOT NULL,
`IDagenda` tinyint(4) NOT NULL default '0',
KEY `ID` (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=5;
****************************contenu table 1,2,3*******
INSERT INTO `table1` (`ID`, `nom`, `IDagenda`) VALUES (1, 'toto', 1),
(2, 'toto2', 2),
(3, 'paul', 2),
(4, 'pierre', 2);
***************************table2,3**********
CREATE TABLE table2 AS SELECT * FROM table1
CREATE TABLE table3 AS SELECT * FROM table1-- ( pour le test)
***************************table config*****
CREATE TABLE `config` (
` planconfid` tinyint(4) NOT NULL default '0',
`preferences` text NOT NULL,
`comment` text NOT NULL,
) TYPE=MyISAM;
****************************contenu de config**
INSERT INTO `config` (` planconfid`, `preferences`, `comment`) VALUES (2, 'voici ce preferences', 'des infos'); |
Partager