0
How to take while from this example and display only 1 given?
$query = $mysql->query("SELECT * FROM dados WHERE id='$id'");
while($row = $query->fetch_array()){
echo $row['nome'];
}
0
How to take while from this example and display only 1 given?
$query = $mysql->query("SELECT * FROM dados WHERE id='$id'");
while($row = $query->fetch_array()){
echo $row['nome'];
}
1
$query = $mysql->query("SELECT * FROM dados WHERE id='$id'");
$row = $query->fetch_array();
echo $row['nome'];
Browser other questions tagged php mysql
You are not signed in. Login or sign up in order to post.
Add
LIMIT 1
in his query. Or use$row = $query->fetch_array(); echo $row[0]['nome';]
– Valdeir Psr
$Row = $query->fetch_array(); echo $Row[0]['name'];
– João Pedro Morais
using this option it appears only the first letter
– João Pedro Morais
$row = $query->fetch_array(); echo $row['nome'];
– Valdeir Psr
Thanks now it worked :D
– João Pedro Morais