@@ -21,8 +21,8 @@ void* sqlite3_open_idr(const char *filename){
21 int res =sqlite3_open(filename,&db);
21 int res =sqlite3_open(filename,&db);
23 if(res != SQLITE_OK){
23 if(res != SQLITE_OK){
25 printf("Error occured while opening the databse.");
24 printf("Error occured while opening the databse.");
27 DBinfo *dbi = malloc(sizeof(DBinfo));
27 DBinfo *dbi = malloc(sizeof(DBinfo));
28 dbi->db_ptr = db;
28 dbi->db_ptr = db;
@@ -209,8 +209,8 @@ int sqlite3_get_val_int(void* p,const char* tbl_name, int nRow, int nCol){
212− rc =sqlite3_column_int(stmt, nCol);
212+ val =sqlite3_column_int(stmt, nCol);
213− printf("int_val : %d\n", rc );
213+ printf("int_val : %d\n", val );
214 rc =sqlite3_finalize(stmt);
214 rc =sqlite3_finalize(stmt);
215 if( rc != SQLITE_OK){
215 if( rc != SQLITE_OK){
216 printf("Couldnt finalize:\n");
216 printf("Couldnt finalize:\n");
@@ -236,8 +236,8 @@ const unsigned char* sqlite3_get_val_text(void* p,const char* tbl_name,int nRow,
237 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
237 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
238 if(rc != SQLITE_OK){
238 if(rc != SQLITE_OK){
239− fprintf(stderr, "SQL Prepare error");
239+ fprintf(stderr, "SQL Prepare error\n");
242 rc = sqlite3_step(stmt);
242 rc = sqlite3_step(stmt);
@@ -273,7 +273,7 @@ float sqlite3_get_float(void* p,const char* tbl_name, int nRow, int nCol){
274 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
274 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
275 if(rc != SQLITE_OK){
275 if(rc != SQLITE_OK){
276− fprintf(stderr, "SQL Prepare error");
276+ fprintf(stderr, "SQL Prepare error\n");
279 rc = sqlite3_step(stmt);
279 rc = sqlite3_step(stmt);