[eluser]rash[/eluser]
Helloo
Can anyone tell me that, how can i write recursive function or using while in while loop.
My problem is, in a hostel i want to show the list of students which are not paid the hostel payments, month wise.
There is a student table, room_allocate table for students to allocate the room in a hostel and a payment table.
If we consider the month is June, then i want to show how many students are not paid the hostel payment in june month which are stayed in hostel.
In student table a hostel_status field is available to show which are stayed in hostel.
for view all hostel students class wise the code is:
Code:
SELECT * FROM `students` WHERE class='1st' AND hostel_status='YES';
and to see the students which are paid in june month
Code:
SELECT * FROM `hostel_payment` WHERE month='6';
but my need is how many students are not paid the hostel payment in june month which are stayed in hostel
Can anyone help for this, i want both mysql and mvc code for this.
thanks in advance