$cutoff_timestamp = $mdb2->quote(date('Y-m-d', strtotime('-1 year')));
$sql = "select org_id from".
" (select max(accessed) as last_access, org_id from tt_users where org_id > 0 group by org_id order by last_access, org_id) as t".
$cutoff_timestamp = $mdb2->quote(date('Y-m-d', strtotime('-1 year')));
$sql = "select org_id from".
" (select max(accessed) as last_access, org_id from tt_users where org_id > 0 group by org_id order by last_access, org_id) as t".