An excerpt from the PHP documentation, you newbie guys really gotta download a copy of this and check it before posting, it'd solve your problems way faster than us experienced programs could. 🙂
int mysql_query (string query [, int link_identifier])
mysql_query() sends a query to the currently active database on the server that’s associated with the
specified link identifier. If link_identifierisn’t specified, the last opened link is assumed. If no link is
open, the function tries to establish a link as if mysql_connect() was called with no arguments, and use it.