I often use this command to retrieve data from mySQL
$x = mysql_query("SELECT * FROM member WHERE member='John'"); $y = mysql_fetch_array($x, MYSQL_BOTH); echo $y;
The problem now is, I want to fetch only one data from a single column. it can be done using this:
$x = mysql_query("SELECT memid FROM member WHERE member='John'"); echo $x;
the problem is, when i print the result, it just show the Resource ID. How to fetch the data into a variable?