stuck in query..

hey guys this is the structure of the Db:

Ex_ID int(11) NOT NULL auto_increment,
N_Etudiant varchar(25) NOT NULL,
Professeur varchar(50) NOT NULL,
Foyer varchar(50) NOT NULL,
Motif varchar(50) NOT NULL,
Date date NOT NULL,
Notes text NOT NULL,
Autre varchar(150) NOT NULL,

so basically N_Etudiant is a student name…

so when we insert it looks like

N_Etudiant Mike
Professeur mrpopins
Foyer 301
Motif fight
Date 2011/01/01
Notes none
Autre 0

so the query i need is to flag if (N_Etudiant) has the same (Professeur) more the 2 times

cause we need to know if the student (N_Etudiant) has been expelled from class by the same teacher (Professeur) more then 2 times…

is this clear?lol

Sponsor our Newsletter | Privacy Policy | Terms of Service