aboutsummaryrefslogtreecommitdiff
path: root/db.h
blob: 81a6bcd3af1ef8a0decb522f3273f34865ef9d66 (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
#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_stmt *byid(char *, int);
struct post *getpost(sqlite3_stmt *, int);
struct user *getuser(sqlite3_stmt *, int);