where i find this header?
sqlite3 do not have it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#include <stdio.h>
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
#include "mysqlite.h"
int main ()
{
sqlite3 * db;
char * sql;
sqlite3_stmt * stmt;
int nrecs;
char * errmsg;
int i;
int row = 0;
CALL_SQLITE (open ("test.db", & db));
sql = "SELECT * FROM t";
CALL_SQLITE (prepare_v2 (db, sql, strlen (sql) + 1, & stmt, NULL));
while (1) {
int s;
s = sqlite3_step (stmt);
if (s == SQLITE_ROW) {
int bytes;
const unsigned char * text;
bytes = sqlite3_column_bytes(stmt, 0);
text = sqlite3_column_text (stmt, 0);
printf ("%d: %s\n", row, text);
row++;
}
else if (s == SQLITE_DONE) {
break;
}
else {
fprintf (stderr, "Failed.\n");
exit (1);
}
}
return 0;
}
|
Last edited on
it is about mysqlite.h not sqlite3
It looks like something made up for someone's project. My guess is that you don't need it.
Last edited on
If you include the amalgamated source file in your project, you don't need a library.