diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-18 10:38:09 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-18 10:38:09 +0200 |
commit | 0292e86cf884a26108a59d81d69cee83b54f4c88 (patch) | |
tree | 3f5b30fe172013802955213503a5827616be6fec /cforum.c | |
parent | ae9b583b9575679f129680a0f56163fdb6590052 (diff) | |
download | cforum-0292e86cf884a26108a59d81d69cee83b54f4c88.tar.gz |
Clean up database code
Diffstat (limited to 'cforum.c')
-rw-r--r-- | cforum.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -15,7 +15,7 @@ int main(int argc, char *argv[]) { char err[MAXERR], *p, *v; - int attachmentid, postid, userid; + int attid, postid, userid; sqlite3_stmt *stmt; /* @@ -70,11 +70,11 @@ main(int argc, char *argv[]) } /* Parse query string. */ - attachmentid = postid = userid = 0; + attid = postid = userid = 0; while(p = nextparam(GET, 128)){ v = split(p); - if(!attachmentid && strcmp(p, "attachment") == 0) - attachmentid = atoi(v); + if(!attid && strcmp(p, "att") == 0) + attid = atoi(v); else if(!postid && strcmp(p, "post") == 0) postid = atoi(v); else if(!userid && strcmp(p, "user") == 0) @@ -82,8 +82,8 @@ main(int argc, char *argv[]) } /* Handle request. */ - if(attachmentid) - showattachment(attachmentid); + if(attid) + showatt(attid); else if(postid) showpost(postid); else if(userid) |