hi,
in my DB dates are written in timestamp format. i thought it would be easier to retrieve data from before a week, fortnight or a month. unfortunately, i got stuck and can't even make a simple comparison without generating an error message. here's my code.
e.g. need to get data from before a week untill now
newdate == date("Ymdhis") - 7; //trying to get a timestamp format
$sql= "SELECT * FROM offers WHERE date > $newdate";
$sql_job = mysql_query($sql,$connection);
while ($row = mysql_fetch_array($sql_job)) {
$id = $row["id"];
$date = $row["date"];
echo $id . " " . $date . "<br>";
}
any help on how to do this will be appreciated.
witold