Active
Project:
Profile2 XMLSitemap
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Sep 2013 at 04:02 UTC
Updated:
10 Mar 2014 at 06:11 UTC
Jump to comment: Most recent
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
Comment #1
raulmuroc commentedWhat 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?
Comment #2
makangus commentedActually we already have db_query_range. I think we want db_select.