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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:22:15+00:00 2026-06-01T02:22:15+00:00

I have a recurring payment mode in the system. All is well, API successful

  • 0

I have a recurring payment mode in the system. All is well, API successful response is logged on the database.
The concern of my question is, I’m about to automate the subsequent payment action (which unfortunately, the payment gateway doesn’t support) of the system.
Via cron I’ll schedule a check on whether which accounts must be included in the subsequent process and notice.
I have here a snip of the database entry:

+---------------------+---------------------+--------------------+
| payment_date        | payment_expirydate  | transaction_number |
+---------------------+---------------------+--------------------+
| 2012-02-14 03:47:15 | 2012-05-14 03:47:15 | 1-67815163         |
| 2012-02-16 00:53:03 | 2012-05-16 00:53:03 | 1-69010235         |
| 2012-02-16 08:57:16 | 2012-05-16 08:57:16 | 1-69027483         |
| 2012-02-16 09:08:06 | 2012-05-16 09:08:06 | 1-69027694         |
| 2012-02-16 09:58:17 | 2012-05-16 09:58:17 | 1-69028921         |
| 2012-02-17 09:28:32 | 2012-05-17 09:28:32 | 1-69072076         |
| 2012-02-17 06:17:45 | 2012-05-17 06:17:45 | 1-69068200         |
| 2012-02-17 11:12:08 | 2012-05-17 11:12:08 | 1-69074788         |
+---------------------+---------------------+--------------------+

I am having a difficulty in creating the SQL query for this. Assuming, the date today is 2012-05-16 and the time is 07:00:00. I want to get all the accounts which is today and less than the current time. For instance, the only valid account (based on the current date and time I indicated) I need is account 1-69010235.

Also, any tips if on what interval should I set my cron to run?

  • 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-01T02:22:17+00:00Added an answer on June 1, 2026 at 2:22 am

    This query will return all records that expire today –

    SELECT *
    FROM accounts
    WHERE payment_expirydate BETWEEN CURRENT_DATE AND (CURRENT_DATE + INTERVAL 1 DAY - INTERVAL 1 SECOND)
    

    If you want all accounts expiring today but less than current time –

    SELECT *
    FROM accounts
    WHERE payment_expirydate BETWEEN CURRENT_DATE AND CURRENT_TIMESTAMP
    

    For codeigniter’s AR implementation you should be able to use –

    $this->db->where('payment_expirydate BETWEEN CURRENT_DATE AND CURRENT_TIMESTAMP', NULL, FALSE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to integrate Stripe's recurring payment system with Devise, using Ryan's recent
Following up on my previous newbie question about Paypal , I have a new
i have quick question, i'm setting up recurring subscriptions for paypal and i can't
I'm trying to create recurring payment profile using CreateRecurringPaymentsProfile method of Paypal API version
I have implemented paypal recurring payment without any trial period. Now I need to
We're setting up a system that will use the XML API for Automated Recurring
In a Java web application I have a recurring message load of type A
I enjoy developing algorithms using the STL, however, I have this recurring problem where
Suppose I have a non-recurring event that needs to be raised X seconds from
What are some of the popular web payment API/services that can be easily integrated

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.