#include sqlite3 *db; struct attachment{ int id; int post; int bytes; char *name; char *description; char *mime; char *data; }; 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 attachment *getattachment(sqlite3_stmt *, int); struct post *getpost(sqlite3_stmt *, int); struct user *getuser(sqlite3_stmt *, int);