Note that there are some explanatory texts on larger screens.

plurals
  1. POmysql datetime range select
    primarykey
    data
    text
    <p>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:</p> <pre><code>+---------------------+---------------------+--------------------+ | 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 | +---------------------+---------------------+--------------------+ </code></pre> <p>I am having a difficulty in creating the SQL query for this. Assuming, the date today is <strong>2012-05-16</strong> and the time is <strong>07:00:00</strong>. 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 <strong>1-69010235</strong>.</p> <p>Also, any tips if on what interval should I set my cron to run?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload