since nothing is getting outputted in your table it either means an error occured in one of your queries, or an error occured during the parsing of the php page (when the display_errors settings is off).
Add this line at the end of each mysql_query call, and tell us what you see:
make sure you remove the ; at the end of the line first.
Place this code snippet on top of the page:
Now you should get a clear error-output when an error occures. If still nothing is printed, there's probably something wrong in your query that's causing the database to select not a single row (no error, just a logical error).