cs_Diablo62
Messages postés25Date d'inscriptionsamedi 27 décembre 2003StatutMembreDernière intervention25 août 2011
-
24 août 2011 à 21:25
bobertin89
Messages postés38Date d'inscriptionmercredi 14 avril 2010StatutMembreDernière intervention 2 septembre 2011
-
2 sept. 2011 à 15:25
Bonjour,
C'est pas facile à expliquer mais je vais tenter :)
J'ai une table qui contient différents champs :
Table user :
id | user | mdp | ....
1 | toto | 123 | ....
2 | tata | 456 | ....
3 | titi | 789 | ....
Et j'aimerai une vue de ce style :
id | user | att | op | value
1 | toto | pass| = | 123
1 | toto | qo | = | hhh
2 | tata | pass| = | 456
2 | tata | qo | = | hhh
3 | titi | pass| = | 789
3 | titi | qo | = | hhh
id = user.id
user = user.user
att = 1 fois pass et 1 fois qo
op toujours value = 1 fois user.pass et 1 fois une constante
Si qq un sait comment on fait ca m interesse :)
J'avais pensé faire une table pour att et op je pensai faire une table et faire une jonction par contre pour value je cale ...
bobertin89
Messages postés38Date d'inscriptionmercredi 14 avril 2010StatutMembreDernière intervention 2 septembre 2011 2 sept. 2011 à 15:25
Salut,
qu'entends-tu par vue en php?
Si c'est pour un afficher dans une page
1 toto pass = 123
1 toto qo = hhh
2 tata pass = 456
2 tata qo = hhh
3 titi pass = 789
3 titi qo = hhh
tu fais ta requete et un truc du genre