SELECT * FROM homes WHERE active=1 and nid != 0 LIMIT -10,10