From e16a05cda7e59041eb2a3c4ffd144d0d89c19f83 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 2 Dec 2010 18:15:50 +1100 Subject: [PATCH] listBoards() functions --- inc/functions.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/inc/functions.php b/inc/functions.php index 2349197c..d071fddf 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -56,6 +56,18 @@ } else return false; } + function listBoards() { + global $sql; + sql_open(); + $boards_res = mysql_query("SELECT * FROM `boards`", $sql) or error(mysql_error($sql)); + + $boards = Array(); + while($_board = mysql_fetch_array($boards_res)) { + $boards[] = $_board; + } + return $boards; + } + function threadExists($id) { global $sql; $thread_res = mysql_query(sprintf(