I'm trying to get only the name of a column from a database table, and it always returns only the Resource id # 4, I'm going to send a portion of my code.
<?php
mysql_connect('localhost', 'root', '') or die ("Erro ao conectar!");
mysql_select_db('agenda') or die ("Erro ao conectar!");
?>
<?php
$iid = $_GET['id'];
//echo $iid;
$nomepessoa = "SELECT nome FROM pessoa WHERE id = $iid";
$queryy = mysql_query($nomepessoa);
echo $queryy;
?>