I am developing a 'online students discussion platform' for a certain university, i want a student to post a question to only students belonging in the same faculty so that if ICT student posts a question, the system extracts all the students in ICT faculty from the students table, attaches them to the post and inserts them into the table receivers.
The system is extracting all students from the students table but it is inserting only one student in the table receivers.
TABLES:
-students(regno,name,faculty_code) PRIMARY KEY regn
-receivers(id, regno,message_id)
how to do it?