All pastes #277630 Raw Edit

Untitled

public text v1 · immutable
·published 2006-12-13 13:06 UTC
rendered paste body
        String query = "SELECT page_namespace, page_title, old_text, rev_timestamp, rev_id,"
            + " count(pl_title) as backlinks,"
            + " 1+if(count(pl_title) <= 50, count(pl_title), 5.0)/10 as boost,"
            + " img_major_mime, img_minor_mime, rev_user_text"
            + " FROM revision, text, page"
            + " LEFT OUTER JOIN image ON page_namespace=6 AND page_title=img_name"
            + " LEFT OUTER JOIN pagelinks"
            + "      ON pl_namespace <> 2 AND pl_namespace=page_namespace"
            + "         AND pl_title=page_title"
            + " WHERE page_latest=rev_id AND rev_text_id=old_id"
            + " AND rev_id > ? AND page_is_redirect=0"
            + " GROUP BY page_id ORDER BY rev_id ASC LIMIT ?";