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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:14:40+00:00 2026-06-16T00:14:40+00:00

I am trying to make a script which shows upcoming event (single one). Here

  • 0

I am trying to make a script which shows upcoming event (single one).

Here is what I have:

Joomla, an extension where you can add an event and a calendar of that extension that shows those events on it. Events are stored in MySQL (date of event is stored xxx-xx-xx format).

To show an event till date I am thinking this:

<?php if(strtotime('gets date from mysql') > time()): ?>

And I face an issue here. How to tell a script what event to pick automaticaly, and after deadline to pick another, nearest event?

To find an event I think it has to search from this day and find the first one after today’s date.

(edit: maybe it is better to use SELECT * FROM ... WHERE 'time' > NOW() ORDER BY 'time' ASC LIMIT 1 instead of strtotime?)

Thank you!

Regards,
Baseckas

  • 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-16T00:14:40+00:00Added an answer on June 16, 2026 at 12:14 am

    You need a query like this to return your upcoming event:

    SELECT * FROM EventTable
    WHERE Date > CURDATE()
    ORDER BY Date
    LIMIT 0, 1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have spent the whole day trying to make a script which on submit
I have a pagination script, which can be seen here: http://www.automotori6282.tk/phpsandbox/ This is the
I am trying to make something which shows one of two divs based on
So im trying to make an easy script, which will hold a video... And
I'm trying to make an optional draggable div, which shows up at some condition.
So, I'm trying to make myself a Python script which goes through the selected
I'm trying to make a script, which search the list of urls given in
I'm trying to make a module in Drupal which utilizes exec(). The script runs
I am doing upcoming event which takes data from MySQL of another script (in
I have been trying to make a updateable grid.Which means i show an icon

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.