function topPhotoUploaderRobi() { $data = new DataAccess('photo'); $sql = "SELECT * FROM items WHERE type='photo' AND status='Active' AND robi_user=1 ORDER BY percentage DESC, like_count DESC, entry_date DESC"; $resultset = $data->getResultSet($sql); if ($resultset) { return $resultset; } else { return mysql_error(); } }