Is it possible to include strtotime date comparison parameters when using medoo to SELECT rows from a database?
I'm using medoo to make database work nice & simple - it's great. However, I'm not sure if I can (but suspect I can) include a date range like parameter when getting rows from my database.
Instead of going through all rows in a foreach routine of what is a large database, I was hoping I could optimise my SELECT/WHERE calls. My loose example/idea is here, but I'm not sure what will work.
$thelogs = $database->select("system_logs",
array("date", "category", "description","class"),
array("date" => .........strtotime('-7 day'))
);
...More information pertaining the way dates are being saved.
Date column is set to datetime in MySQL
Example entry would be: 2014-12-21 05:31:22
In php i'm just using date('Y-m-d H:i:s')
I managed to get this to work with the following: