I want to fetch this result from the database that i've already created and has value i've added. After researching some old codes (1 yr ago) and searching at stackoverflow. I'm using this source: how to fetch all the row of the result in php mysql?
I tried with same writing code, and the results never shown. Already tried to troubleshoot by: - Checking it's number of row by using mysqli_num_rows and find 2 rows and that is correct. - Reverse if from ($count > 0) to ($count < 0), and it seems no logical problem
<?php
$query_call = "SELECT * FROM ass";
$result = mysqli_query($conn, $query_call) or die(mysqli_error($conn));
$count = mysqli_num_rows($result);
if (mysqli_num_rows($result))
{
while ($row = mysqli_fetch_assoc($result));
{
//echo "Double";
echo $row['stand'];
}
}
else
{
echo "<tr><td colspan='7'>Data Did not found</td></tr>";
}
?>
The result i want is as same as the value that stored at database.
;in the while loop.Do like thiswhile ($row = mysqli_fetch_assoc($result)){ //do stuff }