aboutsummaryrefslogtreecommitdiff
path: root/db.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-17 22:08:50 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-17 22:08:50 +0200
commit3e400c3df5572524b7ba08b030f45eb3ba6b7734 (patch)
treec7fd7a5d391649c7905ee685cfa7fe7b4498cf1b /db.h
parent361bb55f01ba28960a8127b0a16c1e7a7a8de61a (diff)
downloadcforum-3e400c3df5572524b7ba08b030f45eb3ba6b7734.tar.gz
Add database helper functions
Diffstat (limited to 'db.h')
-rw-r--r--db.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/db.h b/db.h
index 629cb3b..a70e156 100644
--- a/db.h
+++ b/db.h
@@ -1,9 +1,23 @@
#include <sqlite3.h>
+sqlite3 *db;
+
+struct post{
+ int id;
+ int parent;
+ int user;
+ int created;
+ int edited;
+ char *subject;
+ char *text;
+};
+
struct user{
int id;
char *name;
+ char *full;
char *hash;
};
-sqlite3 *db; \ No newline at end of file
+struct post *getpost(int);
+struct user *getuser(int); \ No newline at end of file