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

  • Home
  • SEARCH
  • 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 7406923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:37:52+00:00 2026-05-29T05:37:52+00:00

I am building a small online app (PHP/MySQL) where users can sign-up to become

  • 0

I am building a small online app (PHP/MySQL) where users can sign-up to become members, and inside the members area they have a list of quizzes they can take.

When displaying the list of quizzes for a given user (i.e. his browser just requested the page with the list), I need to know, for each quiz, whether or not the user already took it in the past. Cause if he did I’ll display a checkmark aside to it. This is to help users keep track of their usage of the site.

My problem: So basically I need to store a list of “taken quizzes” for each user. But I am not sure about the best way of doing it.

My solution so far: Each quiz has an ID, so I am planning to store the list of “taken quizzes” for each user as a string (with values separated by commas) on my database. Then when I need to use it I read the string from the database and transform it into an array (and vice-versa for storing it back).

UPDATE: Apparently there are 2 viable options: 1) is to use the method I described above storing the array as a string, 2) is to create another MySQL table to store the quiz-id/user-id pairs. At this point I am wondering which solution is faster, should the site become popular. With the first option I will have the extra work of converting the string to an array and back, but after that I’ll be searching on a small array (i.e., containing only the quizzes taken by the single user). With the MySQL solution I wouldn’t need to convert strings back and forth, but I would need to search on a much larger dataset (i.e., all the quizzes taken by all the users). Any guess on which method is faster for a large number of users (e.g., 1000)?

  • 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-05-29T05:37:52+00:00Added an answer on May 29, 2026 at 5:37 am

    If you use some thing like MySQL then try a similiar table structure:

    TABLE: users
    user_id | user_name

    TABLE: quiz
    quiz_id | quiz_name

    TABLE: quiz_taken
    taken_id | user_id (FK) | quiz_id (FK) | timestamp

    Add an entry into the quiz_taken table for each participation in the quiz. Also, you can always add more coloumns to store more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a small web app in PHP that stores some information in a
First, I only have experience building small-medium sized websites with php so forgive me
I'm building a small web app that allows users to list their goals. I
I am building a very small website (with PHP) and I have 2 big
I'm building a small web app with Python on GAE. I have an HTML
I'm building a small experiment in php/javascript, where people have to rate the familiarity
I'm building a small app that requieres the IntentReceiver. Actually, I am a newb
I am building a small wpf app in C#. When a button gets clicked
I am building small app that will only display products in various categories. And
I'm building a small app to send my 2do list stuff to Evernote over

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.