assumptions:
1. you are using mySQL
2. your table is called "table"
3. you have a DATETIME field in "table" called "date_time"
$two_days_ago = date('Y-m-d H:i:s', strtotime('2 days ago'));
$result = mysql_query("SELECT * FROM table WHERE date_time < '$two_days_ago'");
// loop through results...
if my assumptions are wrong adjust as necessary