← cproj

select

6448edd4cb4add62878be65d437322d53fd995a4 · ovidiucs · Oct 10, 2019 09:10

+19 −2 · 1 file changed

  • graph/db/sqltest2.c +19 −2
diff --git a/graph/db/sqltest2.c b/graph/db/sqltest2.c
index 51b0da7..ff86fe6 100644
--- a/graph/db/sqltest2.c
+++ b/graph/db/sqltest2.c
@@ -1,5 +1,6 @@
 #include <stdio.h> // fprintf, printf
-#include "../../local/include/sqlite3.h"
+//#include "../../local/include/sqlite3.h"
+#include <sqlite3.h>
 
   // Set a glbal string that will hold some SQL sample
   // data
@@ -15,7 +16,8 @@ char *sSql = "DROP TABLE IF EXISTS Friends;"
             "INSERT INTO Friends(Name) VALUES ('Jim');"
             "INSERT INTO Friends(Name) VALUES ('Roger');"
             "INSERT INTO Friends(Name) VALUES ('Robert');";
-
+int dbInsert(sqlite3 *db, char *data);
+int (*callback)()
 // --------------------------------------------------------------------------------------------------
 
 int dbInsert(sqlite3 *db, char *data) {
@@ -48,6 +50,21 @@ int dbInsert(sqlite3 *db, char *data) {
 
 
 // Select data
+
+  // Select and return row(s) of data
+  // 1st arg - an open database - sqlite3_prepare
+int dbSelectData(sqlite3 *db,char *zSql) {
+  // prepare
+
+  // step
+
+  // column
+
+  // finalize
+
+  // return
+}
+
 // Update data
 // Delete data
 // --------------------------------------------------------------------------------------------------