summaryrefslogtreecommitdiff
path: root/all.php
blob: 2588a3861f6e9c294fdc338177c4b0dcf707e178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php include_once 'header.php';?>

<table>
<tr>
	<th class="left">Latest Threads</th>
	<th class="right">Latest Post</th>
</tr>

<?php

include_once 'includes/db_inc.php';
include_once 'includes/functions_inc.php';

$sql = "SELECT thread_id, thread_subject, thread_date, user_id, user_name, cat_id, cat_name FROM threads JOIN users ON thread_author = user_id JOIN categories ON thread_cat = cat_id ORDER BY thread_id DESC";
$result = mysqli_query($dbc, $sql);

if (!$result) {
	die('Error trying to display threads: ' . mysqli_error($dbc));
}

display_threads($dbc, $result, true);
mysqli_free_result($result);

?>

</table>

<?php include_once 'footer.php';?>