diff options
author | June McEnroe <june@causal.agency> | 2020-07-11 18:56:17 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-11 18:56:17 -0400 |
commit | c1fca2dd18282556e0eff0c0aa209c5088464400 (patch) | |
tree | db34ca17e03f22bbe4d791df459cef25d35816bb | |
parent | Attempt some more styling (diff) | |
download | scooper-c1fca2dd18282556e0eff0c0aa209c5088464400.tar.gz scooper-c1fca2dd18282556e0eff0c0aa209c5088464400.zip |
Fix search query
Diffstat (limited to '')
-rw-r--r-- | search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/search.c b/search.c index 3026a3b..1cfc0f1 100644 --- a/search.c +++ b/search.c @@ -41,7 +41,7 @@ const char *SearchQuery = SQL( AND coalesce(contexts.name = :context, true) AND contexts.query <= NOT :public AND search MATCH :query - LIMIT :limit, :offset; + LIMIT :offset, :limit; ); enum kcgi_err pageSearch(struct kreq *req) { @@ -67,7 +67,7 @@ enum kcgi_err pageSearch(struct kreq *req) { sqlite3_reset(stmt.search); dbBindText(stmt.search, ":network", scope.network); dbBindText(stmt.search, ":context", scope.context); - dbBindText(stmt.search, ":search", scope.query); + dbBindText(stmt.search, ":query", scope.query); dbBindInt(stmt.search, ":public", pagePublic); dbBindInt(stmt.search, ":limit", pageLimit); dbBindInt(stmt.search, ":offset", offset); |