= DATE_ADD(NOW(), INTERVAL -' . $filter_period . ' HOUR)'; break; case "postgresql": $filter .= ' AND fecha >= NOW() - INTERVAL \'' . $filter_period . ' HOUR \''; break; case "oracle": $filter .= ' AND fecha >= (SYSTIMESTAMP - INTERVAL \'' . $filter_period . '\' HOUR)'; break; } } $sql = sprintf( "SELECT * FROM tsesion WHERE %s ORDER BY fecha DESC", $filter); $result = db_get_all_rows_sql($sql); print_audit_csv($result); ?>