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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:24:26+00:00 2026-06-18T10:24:26+00:00

I have a table, with around 30 columns. It is being used by few

  • 0

I have a table, with around 30 columns.
It is being used by few different PHP pages.

I’m going to add a time column to this table. Rows posted 3 months or before will not be selected in the queries.

So, I’ve got few ideas on my mind.

  1. Add a “timestamp” column with INT, use PHP microtime() for calculations.
  2. Rely on PHP’s date functions.
  3. Handle this process in MySQL itself.

    • I was about to use the first option, because it’s pretty easy to maintain integers.
    • I always worried about the standartisation of PHP’s date functions so never relied on them before. For example, in one table I can do 12.12.2012 and in another table I can do 12.12.2012 13:00 or something similar.
    • The website runs on shared hosting, so in the future I may move another hosting and I don’t know if “Export Wizard” also exports those preset values/triggers etc.

In short, how would you do this? Is there anything else you can suggest to me?

  • 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-18T10:24:27+00:00Added an answer on June 18, 2026 at 10:24 am

    I think it would perform much better if MySQL did everything.

    Would something like the following work?

    SELECT *
    FROM table_name
    WHERE timestamp_column >= UNIX_TIMESTAMP(NOW()) - 60 * 60 * 24 * 90
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table containing around 100 columns, is it to possible to do
I'm having an issue bending my head around this one. I have a table
My application has multiple SQLite tables(around 20 with different fields). This I have created
I have a data table with nrow being around a million or two and
I have a table with around 15 columns. What I would like to be
I have a table with around 19 columns which contains reasonable large amount of
I have come across this piece of 'voodoo' SQL which is being used to
I have table with around 70 000 rows. There is 6000 rows that i
I have a table with around 40 million rows, and I want to run
Just a small question regarding joins. I have a table with around 30 fields

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.