Here is how it should be:
- search the database for uploads older than a day.
- output the id's for the uploads in a list.
here is what I have so far:
<?php
include 'config.php';
$connect = mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME);
$timestamp = strtotime("-1 days");
$efined = mysql_query("SELECT * FROM uploads WHERE timestamp < '$timestamp'");
$efound = mysql_query($efined);
$enum = mysql_numrows($efound);
$ecount = 0;
echo $enum.'records were found.';
while ($ecount < $enum) {
$euid = mysql_result($efound,$ecount,"uid");
echo $euid.'<br>';
$ecount++;
}
mysql_close($connect);
?>
currently, this outputs nothing, when there is a record 3 days old. How would I spesify the date format? in my database, it looks like this: 2013-04-02. thanks for any help, josh.