Halo-model analysis of the clustering of photometrically selected galaxies from SDSS