How do I take while from this example and display only 1 data?
$query = $mysql->query("SELECT * FROM dados WHERE id='$id'");
while($row = $query->fetch_array()){
echo $row['nome'];
}
How do I take while from this example and display only 1 data?
$query = $mysql->query("SELECT * FROM dados WHERE id='$id'");
while($row = $query->fetch_array()){
echo $row['nome'];
}
$query = $mysql->query("SELECT * FROM dados WHERE id='$id'");
$row = $query->fetch_array();
echo $row['nome'];