Helpers,
I want to show all the rows from a certain table. To do so I started a script.. First I have a $connection and $db from a general include.
Then I start a query to find all the data:
$sql = "SELECT *
FROM pagina, users
ORDER BY pagina_id DESC
";
$result = mysql_query($sql, $connection)
or die("Couldn't find record.");
Then I started the while to do all lines after ofcourse calling the header.
while ($row = mysql_fetch_array($result)) {
$begin = $row["begindatum"];
$pagina = $row["pagina_id"];
$kop = $row["kop"];
$plaats = $row["plaats"];
$naam = $row["auteur"];
$sqlnaam = "select *
from users
where User_id = '$naam'";
$naamresult = mysql_query($sqlnaam, $connection)
or die("oops");
$rij = mysql_fetch_array($naamresult);
$hehe = $rij["naam"];
$row_block_all = "
<tr>
<td>$pagina</td>
<td>$begin</td>
<td>$kop</td>
<td>$hehe</td>
<td>$plaats</td>
<td>
<a href=\"/tools/edit.php?id=$pagina_id\">edit</a></td>
</tr>
";
echo "
$row_block_all
";
}
If I now look at this page it shows all the rows 3 times ...
What am I doing wrong!!!!?????
Thanks
Peanuts