$result = mysql_query($sql, $conn);

?

Try specifying a database.

You'll need to post more of the code if you want us to help...