Search the database and display with while [closed]

-5

Well in the case, my question is as follows, I do a select to database with the criteria I want it to have. How can I then do a while to show these results, which were fetched from the database.

Thank you.

    
asked by anonymous 22.03.2016 / 14:51

2 answers

1

Would that be?

$query = "SELECT...";
$sql = mysqli_query($conexao, $query);

while($dado = mysql_fetch_array($sql)){ // Enquanto houver dados ficará em loop
   $a = $dado['coluna1']; //recupera o dado do array
   $b = $dado['coluna2'];
   echo $a."-".$b."<br><br>"; //exibe o dado
} 
    
22.03.2016 / 18:45
-1

Your question is very comprehensive, first look at how it works to find the data, follow a referral link:

link

So, if you have any questions post here.

Embrace

    
22.03.2016 / 15:34