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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:24:10+00:00 2026-05-25T06:24:10+00:00

I know, the title does not sound good however I will explain it clearly.

  • 0

I know, the title does not sound good however I will explain it clearly. In mySQL table there is a column named expires. It will hold a date in the future that will be checked against current time of the server every time a user logs in.

So, when that day is passed and the user logs in, he will get a message. There are two user roles, number 2 and number 3. Number 3 will never have an ending period. Number 2 have “trial” accounts.

I know how to set the value for users with role 2 and make the check against time() on logging, but what is the value I should place in column expires on users with role 3 and how can I make the check against time for them when logging? Maybe a time at 2020 does the trick but isn’t it kind of silly ?

  • 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-25T06:24:11+00:00Added an answer on May 25, 2026 at 6:24 am

    I would probably just store NULL for the non-expiring accounts. When validating them, first test if the column value is null, in which case you have a type 3, then check if the date has passed, wherein you have an expired type 2.

    You can save some programming on the application side if you stored it as a date far far in the future, but a NULL makes more logical sense to me.

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

Sidebar

Related Questions

I know the title does not sound very descriptive, but it is the best
The title is pretty self-explanatory: does anyone know of a (good) properties file reader
I will try to explain myself as best as possible, I know the title
Hope my title is not too confusing. Please let me know if there is
Maybe the title does not word the question so precisely: I know that when
Does anybody know how to set the title to the form viewer when showing
As in a title, does anyone know how to freeze GridView header in ASP.NET
I know the title isn't very clear. I'm new to PHP, so there might
I know the title is a little off, but it's hard to explain the
I know the question title isn't the best. Let me explain. I do a

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.