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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:21:54+00:00 2026-05-31T03:21:54+00:00

I am working with PHP and MySQL to develop a web app. Users can

  • 0

I am working with PHP and MySQL to develop a web app. Users can do activities in it, and the activities are logged into a database with the date and the user who did the activity. I need a query that finds all of the activities done by a given user in the last week (the date column is a unix timestamp).

  • 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-31T03:21:55+00:00Added an answer on May 31, 2026 at 3:21 am

    This is the query you need.
    replace tableName and TimeColumn with the real names

    SELECT * FROM tableName WHERE timeColumn > UNIX_TIMESTAMP() - 24 * 3600 * 7 and UserName = 'givenUserName'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was working with php and mysql and can't seem to insert data into
I'm working on a PHP-MySQL web app, and the available tools for server load
I am working on a PHP/MySQL messaging application in which a user can see
I am currently working on a web application that uses PHP and MySQL, but
I'm currently working on a PHP application that uses a MySQL database for its
Can a PHP script (which can be working with a MySQL DB) send and/or
Well,I am learning the web development and currently working on PHP and mySQL ,I
I am working in PHP/MySQL. I have a table in my database called hourly
I'm working with PHP and MySQL, and I'm not too experienced with database design.
I'm working on a PHP/MySQL rating system right now. For the user to be

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.