Mushfiqur
Forum Replies Created
-
Apologies, an addition:
SELECTaletheia_lesson_report.report_studentas ‘Report_student’
,aletheia_lesson_report.report_subjectas ‘Report_subject’
FROMaletheia_lesson_report
WHERE (aletheia_lesson_report.report_subject= ‘Maths’)
ORDER BYaletheia_lesson_report.report_studentasc
I’ve just worked out how to filter for a specific subject!Here’s my follow-up (lol). Bear in mind I don’t know much SQL:
SELECTaletheia_lesson_report.report_studentas ‘Report_student’
,aletheia_lesson_report.report_subjectas ‘Report_subject’
FROMaletheia_lesson_report
ORDER BYaletheia_lesson_report.report_studentasc
I’ve just used the table view and I’ve added the above. So, aletheia_lesson_report is the table and student and subject are columns in the table. I’ve got a view that now lists student name to subject. And as expected, I can see rows of student names (multiple rows for each student) with lots of rows with the same subject. Examples of subjects are: Biology, Chemistry, Physics, Maths, English. What should I do to return student name to subject count, please? For example there are five subjects above. So, I should see the student’s name 5 times and in each row I should see the subject column and a count column of how many subject rows there are for that student. Basically, how many times have they had Biology, Chemistry, Physics, Maths, English.
The data comes from teachers inputting into the lesson report table what student they taught and what subject they taught the student. Would be extremely grateful if you could point me in the right direction. From the example in your link, I couldn’t work out how to adjust the count(empno) for my scenario.Yes, it’s a bog standard WP Data Access table…
Thanks, I’ll have a read of the Search Panes | WP Data Access pages and see if I can find what I need. Thans for the links!Yes, so the aa_student table has stud_id, wp_user_id and stud_fullname columns of which stud_id is the PK.
The aa_test table (just for testing and learning) has test_id (PK), stud_id, wp_user_id and stud_fullname columns in there.The reason I’m trying to pipe those columns from aa_student table (to all other tables) is so that, when I create any new table, the login user is able to view only their data and I don’t have to manually select the student’s/teacher’s wp_user ID every time I add an entry.
Because, the way I have understood it, the login user’s wp user ID must be present and matched to the WPDataAccess table PK of the student. Is that correct or is there a better, more efficient way?
I’ve tried and I can’t get it working…
So, I’ve got one table (aa_student) and another table (aa_test).
aa_student has many colums three of which are stud_id, wp_user_id and full name.
aa_test has 4 columns: stud_id, wp_user_id, full name, note.I gave both tables the same option set name (test01):
and created a parent/child page in Projects with the aa_test table being the chosen table:
I added a lookup relationship. This worked and gave me a dropdown of all the students’s fullnames:
But when I add the additional column lookups (as below) then the dropdown becomes empty and although I can click on a dropdown link, there are no student names in there.
Here are all the lower lookup settings
What am I doing wrong? All I want to do is select a student name and have the data in that row to pipe across automatically and populate the same columns in the new table.
As always, your advice is most appreciated…
Thanks Peter, I’m back in action!
Appreciate you sorting it out so quickly (for all of us).ps. I’ve put a little something into your donation box…
I totally understand; I’ll read through the help links and look forward to your video help.
Yes, I’ll have a dropdown menu for the teacher to select “present, absent or late”. The admin support will create unique attendance registers with a list of students selected in a similar manner as in your 1-2-many relationship videos (where you can select students to add to modules and courses), and then the tutor will edit the rows assigned to them and select present, absent or late.
But obviously, there’s the issue of timestamping each entry and ensuring that when a student/tutor logs in, they see only their attendance records in the table.
Awesome! Thanks ever so much. I’ll update my plugin and try it out.
Peter, it worked!!!
Many thanks for the advice. As I said, I’m in no way, shape or form an SQL programmer or dB designer and your instructions were enough to get me through.
Many, many thanks…
Thanks for the added help; all visuals and step-by-step instructions really do help as I’m not an SQL programmer in any way, shape or form. Love your app and it’s easy to get started. It’s easy to get the school data into the app. It’s just getting use to all the logic and terminology side of things.
I’ll try and understand what you’ve sent and see if I can get it working. Then will return and feedback.
Thanks ever so much!
I’ve just raed the ‘id of the active user in WHERE Clause’ and the ‘User/student record for print?’ threads and watched a few tutorials about the $$USER$$ (video: Managing roles and user access). What I’m not understanding is how do I link the WP User to a row in my students table (or tutor or admin tables), please? So, if I have a WP user login called joe.bloggs and Joe Bloggs is in my student table, how do I link the two together so that all entries pertaining to Joe Bloggs is accessed when joe.bloggs logs in?
Brilliant!
The parent/child method in DATA PROJECTS works perfectly. It’s actually much easier to follow and really makes you think as to how to relate each column and table.
Many thanks
Oh I see, for the moment, we have to consider parent/child pages in substitute for foreign keys?
Would appreciate your help, of course. Should we PM on this occcasion?
OK, I’ll do that and send you the log if that’s OK? I’ll do it tonight when access to the site has reduced and I can revert back to the semicolon theme.
I love your theme because it’s so simple, elegant and versatile. The text font was perfect for me. I can’t stand lily. It’s so blocky and box-like!
My Web address is
http://www.birminghamshadhiliyatrust.org.
I’ve changed the theme to lily temporarily because my friends and members are buying tickets and rooms to a charity Sufi event at the moment.
But what I can tell you is that when I change the theme to other ones, and I preview, I get a preview. But when I revert to the semicolon theme and preview, nothing shows except my menu: no pages or posts show. Also, when I revert to semicolon and go into the dashboard, the page count in all pages is correct and the post count in all posts is correct but in neither can you see a list of posts or pages!