$$USER$$ and how many times to use it
-
Hi Pete,
(I’m not an IT guy in any way shape or form – just an everyday school teacher)
I have a parent table called students and I have added a wp_username_id column in it. I’ve uploaded all my wp users’ first name, last name, ID and user_login into it and made a data project page with the wp_username_id=$$USER$$ in the where clause (I added all the user_login data in my wp_username_id column). I’ve added the shortcode to a page and now when a user logs in, they can only see their own row; that’s perfect as it gives me a basis to create a lesson-by-lesson report for parents to see when they log in as their child.
Now, my question is:
If my student table is a parent table to, say a classroom table or lesson report table or exam results table or subjects taught table (or anything like that), and I make new data projects pages to view (only) each of those tables in a 1:n project (separate pages), will adding wp_username_id=$$USER$$ to each pages’ WHERE clause do the same thing and only allow the user to view their own data?
That way, I can create a student timetable, personal details, courses studying, lesson-by-lesson report and so on. The list can go on.
- The topic ‘$$USER$$ and how many times to use it’ is closed to new replies.