General questions about database - php

I would like to create e-learning platform. So users will have a lot of things to choose (mostly available to view only for them) like:
add note
add movies to favorite
rate the instructor
And few options that auto save for each user like:
unanswered questions
wrong answer questions
movies in progress (user saw only 2 min from 5)
So what database or method I schould use for store that kind of data?
I do not want to use cookies because it needs to be save on user account and not on browser. User need to have that all on every browser or mobile device.
I wondering about json but...if I do so each user I'd will be available to view...so schould I use MySQL?

I would recommend that you build your own data logger, what i mean by this is build yourself a place to store every users data like an eManager if you would like.
Once this has been built you can then assign the eLearning courses using an ID to each of the users profile on your "eManager". Allowing you too keep track of each users progress etc.
The "eManager" could also save the users notes/wrong answers/unanswered questions, you could create surveys with a slider rating to rate the user. Honestly the limit is endless.
You can receive the data in two different ways:
(Personal) Either you can request that your users email you requesting a username and you generate a password and send it out to the user.
(Commercial) You build your eManager to recieve the data from the website which isnt too difficult to do.
It will be a long process and to answer your question in a different view practice SQL/PHP that would be your base make sure you can run more advanced query's and can confidently edit your DB etc.
Anymore questions just let me know, thanks.

Related

How do you handle multiple user in queuing system?

please click this link to show picture Im having a hard time analyzing on how I will create a queuing system where there is multiple user. Let us say that there is 2 user that is using a system how will i implement it? i dont get the logic on how it will be implemented. Like if the first user will tap the next button how will I update it as well that the queue number is update with the other user
Sounds like you need to use a database such as MySQL or MariaDB.
You would store the activity of each user's session in database tables. Of course, I could give you a more specific answer if your question were more specific.

How to build chat rooms attached for a single user profile?

I have a simple php user profile system that works like this: When user is registered he gets a specific url ?user. Therefore, other visitors can access his page.
What I want it to include chat application on users profile pages. But, every single user should have its own chat.
Which approach is the best, as I am a beginner in this? Should I put the messages from chat into the database or should I work with some log.txt files?
Any good tutorial for this would be helpful.
I found some tutorial for you: http://tutorialzine.com/2010/10/ajax-web-chat-php-mysql/
- looks like it could help you.
The only thing you need to adjust is to add room column in WEBCHAT_LINES table - that will be the unique name of the user, into which's chat room the chat line belongs. Then, when new chat line will be sent, you must save it to DB with apropriate room identificator. When you display the messages in chat, you must filter the results in each room to show only the lines for this particular room.
If you haven't use database before, there are plenty tutorials about mysql around the internet - it's not that difficult.
Good luck! And use Google when you'll have some doubts.

Rating and Like System Managment

I'm trying to integrate a rating and like system as part of a package to send to the end user (with unknown progamming skill).
My problem is how to manage the users (registered or not) that have already done an action.At this moment I'm using PHP session to keep stored for a week the information, but this isn't a good solution.Is it a good solution creating 2 tables (one for rating and one for like) to store the information? If I use this solution what's the most useful and "correct" information to retrieve if the user is not registered? And is it user-friendly?I have thought to store: username and the ip
I would extend the members's table with at least two new columns, likes and rating or create a new table (as you said) including the memberID with a reference(and an index) to store and select the data. I believe it's the best way. Unfortunately, in this case non-members cannot press like or rate, but it is a good reason for one to register. –

Can I store lists of permissions from Facebook etc?

I'm building an app, and I want to allow users to integrate it with various social platforms. One of the things users can do is post a link to something they created on our site to their Facebook wall. We want to let them specify who can see whatever they post. I think this can be done but using the Facebook dialog, yes? So they can check the names of people who should be allowed to see the link and then follow it to our site.
However, this is fine from the point of view of seeing it on their wall, but we don't necessarily want other people to stumble onto it by accident, or to share it with other people. For this reason, we want to make sure that the person looking at the stuff on our site is a friend of the person who created it.
My understanding is that we can't store friends IDs if they haven't authorised our app. Can we store the id of the post in a way that lets us figure out the friends IDs from that? E.g. user makes post 5678, and specifies that people A, B and C can see it; we store 5678 and then, as it's needed, we request that post from Facebook, check whether the user trying to view the content is either A, B or C and then act accordingly?
Will that work?
Or is there a better way of doing it?
Thanks!

Schema to build a user updates dashboard activities ala facebook

Assuming that I have a simple website where users can upload photos and they follow each other.
If I follow someone I can see all the updates the users I follow do. Period.
So the user dashboard will show the recent photo uploaded. Simple as that.
My question is:
I was wondering if is better to just query the photo table for where the photos have user-id of people I follow, or create an activity table where I can store the upload etc, or is this redundant?
Well, I suppose it depends how many different kinds of updates you want to show your users. If photos are the only thing you want to display, it's probably not worth making a separate table.
But if you have lots of different kinds of updates then it could be worth making an "updates" table to aggregate them so you only have to query one table to display the dashboard.

Categories