Skip to content

Instantly share code, notes, and snippets.

@BartvanS
Created June 27, 2018 11:17
Show Gist options
  • Save BartvanS/59e1f520f617b4cc92c7d2b64fdad110 to your computer and use it in GitHub Desktop.
Save BartvanS/59e1f520f617b4cc92c7d2b64fdad110 to your computer and use it in GitHub Desktop.
<div class="forumPost">
<?php
$db = new Database();
$forumId = $_GET['forumId'];
$result = $db->query('SELECT `forumposts`.*, forumcategories.* FROM `forumposts` LEFT JOIN forumcategories USING (categoryId) WHERE forumId = "'.$forumId.'"');
$db->execute();
$forumArr = $db->resultset();
//foreach($forumArr as $key => $val ) {
// echo $val['forumId'] . ' + ' . $val['forumNaam'] . ' + ' . $val['subscriptionCount'] . ' + ' . $val['subject'] . ' + ' . $val['content'];
//}
$val = $forumArr;
var_dump($val);
?>
<table>
<tr>
<td></td>
<td><?php echo $val['forumNaam'] ?></td>
</tr>
<tr>
<td> </td>
<td><?php echo 'Subscribers (' . $val['subscriptionCount'] . ')'?></td>
</tr>
<tr>
<td></td>
<td><?php echo $val['content'] ?></td>
</tr>
</table>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment