are you connecting to the database befor issuing the select statement ?
ie:
PHP Code:
$db = mysql_connect("$server", "$user", "$password") or die("Invalid server or user.");
mysql_select_db("your_database", $db);
$result = mysql_query("select * from members order by posts desc limit 10", $db);
You might have forgotten the
$db as the second argument to
mysql_query()