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 7527257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:04:08+00:00 2026-05-30T04:04:08+00:00

I am trying to create a website that retrieves photos for users randomly and

  • 0

I am trying to create a website that retrieves photos for users randomly and without repetition for specific user, till the user see all the photos and init the records for the user.

I thought to have for each user and photo(URL saved) table, a user_photo table, that specifies if the user already saw the photo, but in case of many users and many photos, this will be a huge record.

my question is if there is a better design to retrieve data faster and efficient.

I saw other questions but not related to specific user handling.

  • 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-30T04:04:08+00:00Added an answer on May 30, 2026 at 4:04 am
    1. Create a column in your photo table of DateTime type .
    2. Now, Update all the records with current date time value.
    3. Select a record with Order by clause Ascending
    4. When you have seen the record, update the same record with current date and now fetch the record next time using step 3.

    This will definitely help you alot…

    EDIT

    Below is my suggestion….

    1. While going to select the records from database, don’t go for Inner /Left Join directly between user_Photo and Photo Tables.
    2. Create a Temp table and insert the required records(I meant, while retrieving the photos for User_ID => 1, you need to select the User ID => 1 – photos from this table(user_Photo table) and insert into a Local temp table. Fine? )
    3. Do a Left/Inner Join now between Photo and Temp table to get the records with Order by Clause Ascending

    Hope this will help you….

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

Sidebar

Related Questions

I'm trying to create a PHP form on a website that collects users' name,
I am trying to create a website that will allow users to login with
I am trying to create a website that will have the following Web Access
I am trying to create a table for a website that is a fixed
i'm trying to create an script that automates the logging in to a website
I am trying to create a .js file for a website that upon entering
I'm trying to create a web filter app that will intercept an incoming website(one
I'm trying to create a website that will automate project setup. I want to
I'm trying to create a demo website using websockets that will be a simple
I'm trying to create a small website in ASP.NET MVC that uses twitter. I

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.