seems that your while loop is not done...
Could you post some more code please (SQL query also) so that it could be clearer?
Maybe your query is too accurate and I encountered some troubles with mysql_fetch_array when the result was on a single line.
If it is the case, try with a larger query (no where condition) first and then, if it works, try more and more accurate...
Hope that was it.
Fred.