23 Apr
2007
23 Apr
'07
3:18 p.m.
On Apr 23, 2007, at 12:18 AM, Nedjo Rogers wrote:
But in your case I don't see the need for the subquery.
Is this what you're trying to do?
db_result(db_query(db_rewrite_sql('SELECT max(n.nid) FROM {node} n ORDER BY n.nid LIMIT %d'), $count));
That's exactly what I'm trying to do. But I always get the highest node ID in the table, rather than the highest in the range. That's why I used the sub-query to force the max ID to be selected from within the range.