Dank jullie zeer ik heb nu de code:
PHP
$exec3 = $mysqli->prepare("SELECT * FROM `topics` WHERE catid = ?");
if ($exec3->execute(array($id))) {
while ($topic = $exec3->fetch()) {
$topicid = $topic['id'];
$topicid = mysqli_real_escape_string($mysqli, $topicid);
$topicid = htmlentities($topicid);
$exec4 = $mysqli->prepare("SELECT * FROM `reacties` WHERE topicid = ?");
$exec4->execute(array($topicid));
$reacties = $reacties + $exec4->num_rows;
}
}
Toon Meer
En voel me een stuk veiliger