On Apr 23, 2007, at 9:58 AM, Erdem Köse wrote: > I think this should work: > db_query_range(db_rewrite_sql("SELECT n.nid FROM {node} n ORDER BY > n.nid"), $count-1, 1); Perfect! Now that you point it out, I have no idea why I was using the MAX() function in the first place.