fetch() – See on meetod(PHP’is), mida kasutatakse ühe järgmise rea väljavõtmiseks tulemuste kogumist, mis saadakse pärast SQL-päringu täitmist.
<?php
global $connect;
$paring=$connect->prepare(“
Select id, president, pilt, punktid, lisamisaeg from valimused where avalik=1″);
$paring->bind_result($id, $president, $pilt, $punktid, $lisamisaeg);
$paring->execute();
// Võtame välja ühe rea korraga
while($paring->fetch()){
echo “<tr>”;
echo “<td>”.$president.”</td>”;
echo “<td><img src=\”$pilt\” alt=\”piltuu\”></td>”;
echo “<td>”.$punktid.”</td>”;
echo “<td>”.$lisamisaeg.”</td>”;
echo “<td><a href=’?lisa1punktid=$id’> +1 punkt</a></td>”;
echo “<td><a href=’?kustuta1punktid=$id’> -1 punkt</a></td>”;
echo “</tr>”;
}
?>
FLEX – CSS layout for flexible box arrangement
font-family – property is used to change the font of an element
Footer – <footer> HTML element,kus pannakse veebilehe jalus.
Form –
<form> – HTML element, mida kasutatakse vormide loomiseks kasutajate andmete kogumiseks.
