how many record do you currently have? if more than two, there may be other problems, but here's one:
you don't need the line
$obj = mysql_fetch_object($query);
as it is now, you fetch 2 rows, but only use one. remember, the mysql_fetch_... functions get you one record every time they are called, and while ($obj = mysql_fetch_object($query)) already is one call.
EDIT: too slow again..., but I think the idea is pretty much the same 😉