summaryrefslogtreecommitdiffstats
path: root/friendfinder/util/sqlite_helper.h
blob: 99f2ab1f6541482c705d7802e195e0fcbaa3230e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef ____DB_H_
#define ____DB_H_

#include <sqlite3.h>

struct sql_result
{
	sqlite3_stmt *stmt;
	int columnCount;
};

int sql_result_step(struct sql_result *);
void sql_result_destroy(struct sql_result *res);
sqlite3 *sql_open(char *filename);
int sql_exec(sqlite3 *db, char *msgfmt, ...);
struct sql_result *sql_query(sqlite3 *db, int *error, char *msgfmt, ...);
#endif