diff --git a/~/C/README.md b/~/C/README.md new file mode 100644 index 0000000..32e8cbc --- /dev/null +++ b/~/C/README.md @@ -0,0 +1,9 @@ +# C + +## SQLite 3 + +- [CREATE TABLE](sqlite3_create.c) +- [INSERT INTO](sqlite3_insert.c) +- [SELECT](sqlite3_select.c) +- [UPDATE](sqlite3_update.c) +- [DELETE](sqlite3_delete.c) diff --git a/~/C/sqlite3_create.c b/~/C/sqlite3_create.c new file mode 100644 index 0000000..df137a1 --- /dev/null +++ b/~/C/sqlite3_create.c @@ -0,0 +1,52 @@ +#include +#include +#include + +static int callback(void *NotUsed, int argc, char **argv, char **azColName) { + int i; + for(i = 0; i +#include +#include + +static int callback(void *data, int argc, char **argv, char **azColName) { + int i; + fprintf(stderr, "%s: ", (const char*)data); + + for (i = 0; i +#include +#include + +static int callback(void *NotUsed, int argc, char **argv, char **azColName) { + int i; + for (i = 0; i +#include +#include + +static int callback(void *data, int argc, char **argv, char **azColName) { + int i; + fprintf(stderr, "%s: ", (const char*)data); + + for (i = 0; i +#include +#include + +static int callback(void *data, int argc, char **argv, char **azColName) { + int i; + fprintf(stderr, "%s: ", (const char*)data); + + for(i = 0; i