There has to be an error in your query. I'm assuming $result1 is the result of a call to mysql_query(), no? In any case, $result1 is boolean false, which means if it came from a call to mysql_query() then there's an error with the query, because it returns false if it fails.
Either that or you're doing something to $result1 before using it in the loop.
Regardless, please post more of your code, specifically where you build your query and when you execute a call to mysql_query().