From f88147df5d30d0a4dce86daf80377b24e758c5ea Mon Sep 17 00:00:00 2001 From: <> Date: Mon, 13 Mar 2017 17:35:10 -0700 Subject: [PATCH] Created conditions for fields that will need to be handled differently --- main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index c69d5c9..805ca2c 100644 --- a/main.c +++ b/main.c @@ -88,10 +88,14 @@ void qresult(sqlite3_stmt * const sp, const char *c) { while ((e = sqlite3_step(sp)) == SQLITE_ROW) { printf(""); for (i = 0; i < cc; i++) { - if (i != cvt) { + if (*c == 'm' && i == 1 || (*c == '\0' && i == 3) || (*c == 'p' && i == 0)) { printf("%s", sqlite3_column_text(sp, i)); - } else { + } else if ((i == 0 && *c == '\0') || (i == 1 && *c == 'p') ) { + printf("%s", sqlite3_column_text(sp, i), sqlite3_column_text(sp, i)); + } else if (i == 2 && (*c == 'm' || *c == '\0')) { print_time(sqlite3_column_text(sp, i)); + } else { + printf("%s", sqlite3_column_text(sp, i)); } } printf("");