r1nk Posted September 20, 2013 Share Posted September 20, 2013 Im now making a simple project called student attendance.. I've just managed the register/login part.. Right now, these are the tables that i created so far.. http://i272.photobucket.com/albums/jj178/r1nk_2008/1_zpsf1765f1c.png http://i272.photobucket.com/albums/jj178/r1nk_2008/2_zpsa1a1310a.png http://i272.photobucket.com/albums/jj178/r1nk_2008/3_zps092b7ff1.png http://i272.photobucket.com/albums/jj178/r1nk_2008/4_zps1fffbc49.png What i need right now is some advice on how :- The lecturer can select the course_id that have been assigned and then list of subject he/she teach will appear.. Based on what subject he/she clicked, an attendance table appear with list of students in that class and week 1- week XX (checkbox for attendance).. Do i need to assign some primary and foreign key in my tables or adding some more necessary tables? Quote Link to comment https://forums.phpfreaks.com/topic/282315-give-me-some-vision/ Share on other sites More sharing options...
r1nk Posted September 21, 2013 Author Share Posted September 21, 2013 hmmm.. bump. Quote Link to comment https://forums.phpfreaks.com/topic/282315-give-me-some-vision/#findComment-1450536 Share on other sites More sharing options...
Solution mac_gyver Posted September 22, 2013 Solution Share Posted September 22, 2013 you are still showing a separate table for each different type of user and you have usernames stored in related tables, rather than using the user's id. you were told two or three threads ago not to have separate tables for same meaning information (the users) and you have since gotten your login code to work with a 'type' field in your user table. since you have posted old/out of date table definitions, you need to rework those before you can write any code to use that data. anyway, to answer your question - when a logged in lecturer navigates to the attendance page, you would use their user id to retrieve their list of subjects/classes. when they click on one of them, you would use the class id to retrieve the list of students in that class. Quote Link to comment https://forums.phpfreaks.com/topic/282315-give-me-some-vision/#findComment-1450685 Share on other sites More sharing options...
r1nk Posted September 22, 2013 Author Share Posted September 22, 2013 Thanx for replying.. Yeah, i already updated my user table to one and this new thread is my new problem.. http://forums.phpfreaks.com/topic/282348-view-name-based-on-user-id-and-stored-coursesubject-option-to-respective-tables/ Quote Link to comment https://forums.phpfreaks.com/topic/282315-give-me-some-vision/#findComment-1450693 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.