I'm havig some trouble with SQL:
First, I insert the current date, using PHP-time():
mysql_query("
INSERT INTO applicants (
date_last_applied
)
VALUES (
" . time() . "
)
");
This works just fine. However, I only want to execute an action when that ^ was inserted 10 days ago:
$result = mysql_query("
SELECT * FROM applicants WHERE date_last_applied < DATE_SUB(NOW(), INTERVAL 10 DAY)
");
while ($row = mysql_fetch_array($result))
echo $row['id_member'];
Although it should work (IMO), it doesn't. D:
For possible solutions: it's not an option to use an other timeformat, because I'm using this format on my entire site.