From 3e400c3df5572524b7ba08b030f45eb3ba6b7734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 17 Sep 2021 22:08:50 +0200 Subject: Add database helper functions --- db.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'db.h') diff --git a/db.h b/db.h index 629cb3b..a70e156 100644 --- a/db.h +++ b/db.h @@ -1,9 +1,23 @@ #include +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 -- cgit v1.2.3