Yeah, and you echo’d the value of $query instead of sending query into mysql_fetch_results($query), which would actually return the data. So what you are seeing is the resource PHP is holding that data in.
except that the command itself was deleted from PHP back in December last year. That code will only work with old versions of PHP that will soon no longer exist.