= DATE_ADD(NOW(), INTERVAL -' . $filter_hours_old . ' HOUR)'; break; case "postgresql": $filter .= ' AND fecha >= NOW() - INTERVAL \'' . $filter_hours_old . ' HOUR \''; break; case "oracle": $filter .= ' AND fecha >= (SYSTIMESTAMP - INTERVAL \'' . $filter_hours_old . '\' HOUR)'; break; } } switch ($config["dbtype"]) { case "mysql": $sql = sprintf ("SELECT * FROM tsesion %s ORDER BY fecha DESC", $filter); break; case "postgresql": $sql = sprintf ("SELECT * FROM tsesion %s ORDER BY fecha DESC", $filter); break; case "oracle": $sql = sprintf ("SELECT * FROM tsesion %s ORDER BY fecha DESC", $filter); $result = oracle_recode_query ($sql, $set); break; } $result = db_get_all_rows_sql ($sql); print_audit_csv ($result); ?>