| 12
 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
 
 | Code table
Structure de la table `emprunt`
-- 
 
CREATE TABLE `emprunt` (
  `id_emprunt` int(1) unsigned NOT NULL auto_increment,
  `livrecodebarre` int(1) unsigned NOT NULL default '0',
  `adhcodebarre` int(1) unsigned NOT NULL default '0',
  `date_emprunt` date NOT NULL default '0000-00-00',
  `reservation` tinyint(1) NOT NULL default '0',
  `retour_prevu` date NOT NULL default '0000-00-00',
  `relance_id` int(1) unsigned default '0',
  PRIMARY KEY  (`id_emprunt`),
  KEY `livrecodebarre` (`livrecodebarre`),
  KEY `adhcodebarre` (`adhcodebarre`),
  KEY `relance_id` (`relance_id`)
) TYPE=InnoDB AUTO_INCREMENT=4 ;
 
-- 
-- Contenu de la table `emprunt`
-- 
 
INSERT INTO `emprunt` VALUES (3, 1, 3, '2006-05-11', 0, '2006-05-09', 1);
 
-- 
-- Contraintes pour les tables exportées
-- 
 
-- 
-- Contraintes pour la table `emprunt`
-- 
ALTER TABLE `emprunt`
  ADD CONSTRAINT `emprunt_ibfk_12` FOREIGN KEY (`livrecodebarre`) REFERENCES `livre` (`codebarrelivre`),
  ADD CONSTRAINT `emprunt_ibfk_13` FOREIGN KEY (`adhcodebarre`) REFERENCES `adherent` (`codebarreAdh`),
  ADD CONSTRAINT `emprunt_ibfk_14` FOREIGN KEY (`relance_id`) REFERENCES `relance` (`id_relance`); |