Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:57:41+00:00 2026-06-01T05:57:41+00:00

I was wondering how to efficiently record and display the progress of users in

  • 0

I was wondering how to efficiently record and display the progress of users in an online quiz with mysql and php. If users want to skip certain questions or close the screen, I want them to come back and see the the progress made by having a “completed” next to the question list item or something.

The problem or concern really is how to go about storing that progress and how to check for it.

Here’s my database design simplified for this question’s sake

table 1: user
fields: id, username, pw, username, progress
( yes I have the field called progress here)

table 2: questions
fields: id, lesson, question, hint, answer

so if a user completes a question, then in the progress field, I’d append the question_id in there.

On the homepage with the question list, I would have a grab the progress field of the user id after it’s passed into the page so…

select progress from user where id = $user_id

I’d probably get all these array with all the id’s of the completed questions

Then I’d have to do an if statement for each question “if question id = progress [id] then echo “completed” ” kind of thing statement.

Does this seem efficient? Or how else would you do it? I’d appreciate any tutorials online that does this kind of thing so I can get a much better idea of what’s going on . Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:57:42+00:00Added an answer on June 1, 2026 at 5:57 am

    I would store answered questions in their own table.

    question_id | user_id
        1          1
        2          1
        13         1
    

    Now you can efficiently get all completed questions

    SELECT q.* 
    FROM questions q
    INNER JOIN answered_questions aq ON aq.question_id = q.id AND aq.user_id = 1;
    

    Or not yet completed questions

    SELECT q.* 
    FROM questions q
    LEFT JOIN answered_questions aq ON aq.question_id = q.id AND aq.user_id = 1
    WHERE aq.id IS NULL;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been wondering how I could check all my parameters efficiently in any function
I am wondering how to most efficiently play a series of video with MPMoviePlayerViewController?
Good afternoon all. I was wondering how do we efficiently remove x number of
I am wondering whether I can do the following efficiently in Matlab. Writing a
I'm wondering about an algorithm solving the following (efficiently): A 2D matrix of numbers
Development language and DB: PHP/MySQL I have a table geo_places with something like 8
I want to be able to efficiently find all user with a particular permission
I was wondering if you guys had any input on how to efficiently go
Wondering about how to do the following efficiently, securely, and in a fashion that
I've got a PHP-based site where we allow users to upload a comma-separated text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.