Possible Duplicate:
Why does this return Resource id #2?
I want to echo mysql_query("SELECT SUM(onlineplayers) FROM servers") but when I place echo in front, it says Resource Id #2 and when I add or die(mysql_error()); at the end, it just outputs 1.
You need to fetch the query first:
However, you shouldn’t use the
mysql_functions unless absolutely necessary. themysqlextension is NOT recommended for use in new projects. Instead you should use PDO_mysql or mysqliSource: Why does this return Resource id #2?