WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

Select records from dates range in postgresql | Loop and Break

Select records from dates range in postgresql

We can simply use < (less than) and > (greater than) operators to find out records from specific tables in postgre.

Example (select all records)

SELECT * FROM "dummyTable";
1	anytext1        2012-10-15
2	aummy text 2    2013-01-11
3	dummy text 3    2011-07-19
4	any text 6      2012-05-15

Selecting records from range of dates

Format is : <year>-<month>-<day>

SELECT * FROM "dummyTable" WHERE "theDatefield" < '2014-12-01' AND "theDatefield" > '2012-01-30'
1	anytext1        2012-10-15
2	aummy text 2    2013-01-11
4	any text 6      2012-05-15
Share

You may also like...