Created conditions for fields that will need to be handled differently
This commit is contained in:
parent
32c7286040
commit
f88147df5d
8
main.c
8
main.c
@ -88,10 +88,14 @@ void qresult(sqlite3_stmt * const sp, const char *c) {
|
||||
while ((e = sqlite3_step(sp)) == SQLITE_ROW) {
|
||||
printf("<TR>");
|
||||
for (i = 0; i < cc; i++) {
|
||||
if (i != cvt) {
|
||||
if (*c == 'm' && i == 1 || (*c == '\0' && i == 3) || (*c == 'p' && i == 0)) {
|
||||
printf("<TD>%s</TD>", sqlite3_column_text(sp, i));
|
||||
} else {
|
||||
} else if ((i == 0 && *c == '\0') || (i == 1 && *c == 'p') ) {
|
||||
printf("<TD><a href='/cgi/cts.py?map=%s'>%s</a></TD>", 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("<TD>%s</TD>", sqlite3_column_text(sp, i));
|
||||
}
|
||||
}
|
||||
printf("</TR>");
|
||||
|
Loading…
Reference in New Issue
Block a user