We should convert the long db_query_range query to Drupal 7's Database API
$pids = db_query_range("SELECT p.pid FROM {profile} p LEFT JOIN {xmlsitemap} x ON x.type = 'profile2' AND p.pid = x.id WHERE x.id IS NULL AND p.type IN (:types) ORDER BY p.pid DESC", 0, $limit, array(':types' => $types))->fetchCol();

Comments

raulmuroc’s picture

Assigned: makangus » Unassigned
Issue summary: View changes
Status: Needs work » Active

What we have:

$pids = db_query_range("SELECT p.pid FROM {profile} p LEFT JOIN {xmlsitemap} x ON x.type = 'profile2' AND p.pid = x.id WHERE x.id IS NULL AND p.type IN (:types) ORDER BY p.pid DESC", 0, $limit, array(':types' => $types))->fetchCol();

What we want:

db_query_range($query, $from, $count, array $args = array(), array $options = array())

Isn't it?

makangus’s picture

Actually we already have db_query_range. I think we want db_select.