summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-12-02 18:15:50 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-12-02 18:15:50 +1100
commite16a05cda7e59041eb2a3c4ffd144d0d89c19f83 (patch)
tree908859c22a62e7015f97881e62070c9a0b3c9dce
parentc9adbdda4c3d7c232dadea74912f4ef1149dd10c (diff)
listBoards() functions
-rw-r--r--inc/functions.php12
1 files changed, 12 insertions, 0 deletions
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(