ramsha Posted November 27, 2013 Share Posted November 27, 2013 My table description is as follows **entry_table** - serial(int) - s_name(varchar) - user_id(int) - id(int) **Students_details** - id(int) - user_id(int) - student_name(varchar) - adress(varchar) **User_login** - user_id(int) - user_name(varchar) - password(varchar) - alotment(bool) Scenario is that the students apply for multiple scholarships. Their selections are stored in the entry_table's s_name, user_id and id fields. My next step is to build a sorted list of all the students who applied for a particular scholarship eg:"scholarship1". This list should also show the student's name(student_name field of the students_details table) The lists are to be sorted according to two types of scholarships that the system offers(merit and need). Applicants of the merit scholarship are required to be sorted in descending order using the ratio(obtained marks/ total marks). However, the need scholarship is to be shorted in ascending order as it uses the ratio(family income/no. of non-earning family members) I tried to join my tables using $query = "SELECT *FROM entry_table, students_details WHERE entry_table.id=students_details.id group by entry.s_id,entry.student_id"; Please help in the sorting as per type problem. Also the above query helps joining the tables but doesnt achieve the purpose. thanking you in advance Quote Link to comment Share on other sites More sharing options...
Barand Posted November 27, 2013 Share Posted November 27, 2013 As there is nothing your tables regarding scolarship scolarship type marks family income no. of non-earning family members then I wish you luck in your venture. Goodbye. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.