211
Vývoj / Dvojité načítání tabulky
« kdy: 03. 11. 2020, 07:26:04 »
Dobry den.
Preco mi toto nacita 2x data? pod seba do tabulky?
Preco mi toto nacita 2x data? pod seba do tabulky?
Kód: [Vybrat]
echo "<table class='table table-sm'>
<thead>
<tr>
<th scope='col'>Line</th>
<th scope='col'>Value</th>
</tr>
</thead>
<tbody>";
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo"<tr><td> ";
echo "" . $row["id"]. "</td><td><input type='text' name=". $row["id"]." value=".$row["pieces"]." >";
// echo "<tr><td> " . $row["id"]. "</td><td><input type='text' name=". $row["id"]." value=".$row["pieces"]." ></td></tr>";
echo"</td></tr>";
}
} else {
echo "0 results";
}
echo "
</tbody>
</table>
Kazdopadne dakujem funguje to ako ma.