Insert into de plusieurs tables
labourette
Messages postés
670
Statut
Membre
-
labourette Messages postés 670 Statut Membre -
labourette Messages postés 670 Statut Membre -
Bonjour
J'ai 1 table "adherent"
une autre table "statut"
une table de relation des 2 tables "tb_gestion_admin"
Ma question est la suivante comment on peut faire un INSERT INTO pour que la table "tb_gestion_admin" soit renseigné je vous joint la table des relations.
Un grand merci pour votre aide
J'ai 1 table "adherent"
une autre table "statut"
une table de relation des 2 tables "tb_gestion_admin"
Ma question est la suivante comment on peut faire un INSERT INTO pour que la table "tb_gestion_admin" soit renseigné je vous joint la table des relations.
Un grand merci pour votre aide
-- Structure de la table 'tb_gestion_admin'
--
CREATE TABLE IF NOT EXISTS 'tb_gestion_admin' (
'rid_adherent' int(11) DEFAULT NULL,
'rid_categorie_statut' int(11) DEFAULT NULL,
KEY 'rid_adherent' ('rid_adherent'),
KEY 'rid_categorie_statut' ('rid_categorie_statut')
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table 'tb_gestion_admin'
--
INSERT INTO 'tb_gestion_admin' ('rid_adherent', 'rid_categorie_statut') VALUES
(1, 1),
(2, 1),
(4, 1),
(10, 4),
(11, 3),
(12, 2),
(12, 6);
--
-- Contraintes pour les tables exportées
--
--
-- Contraintes pour la table 'tb_gestion_admin'
--
ALTER TABLE 'tb_gestion_admin'
ADD CONSTRAINT 'tb_gestion_admin_ibfk_2' FOREIGN KEY ('rid_categorie_statut') REFERENCES 'tb_categorie_statut' ('id_categorie_statut') ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT 'tb_gestion_admin_ibfk_1' FOREIGN KEY ('rid_adherent') REFERENCES 'tb_gestion_adherent' ('id_adherent') ON DELETE CASCADE ON UPDATE CASCADE;