diff options
author | Michael McVady <femtonaut@gmail.com> | 2021-11-15 22:53:11 -0500 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2021-11-15 22:53:11 -0500 |
commit | 4a8f1b88607975444abcefebc2b71d9ade79090b (patch) | |
tree | 26214833238c784da5880b5c946a48425171fee6 /src/clog.c | |
parent | 6e1be0ceb2a550fac244f91c18d70f0362c909cf (diff) |
Render table
Diffstat (limited to 'src/clog.c')
-rw-r--r-- | src/clog.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -47,7 +47,8 @@ int page(struct http_request *req) */ int err = kore_pgsql_setup(&sql, "db", KORE_PGSQL_SYNC); kore_log(LOG_ERR, "kore_pgsql_setup: %d", err); - if (!err) { + if (!err) + { kore_pgsql_logerror(&sql); goto out; } @@ -69,9 +70,12 @@ int page(struct http_request *req) id = kore_pgsql_getvalue(&sql, row, 0); title = kore_pgsql_getvalue(&sql, row, 1); body = kore_pgsql_getvalue(&sql, row, 2); + kore_log(LOG_NOTICE, "id: '%s'", id); kore_log(LOG_NOTICE, "title: '%s'", title); kore_log(LOG_NOTICE, "body: '%s'", body); + + kore_buf_appendf(buf, "\t<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n", id, title, body); } out: ; |