-/* $Id: mandocdb.c,v 1.98 2014/04/20 16:44:44 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.99 2014/04/23 16:33:37 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
"AND mlinks.name == names.name"
")"
") JOIN ("
- "SELECT * FROM mlinks GROUP BY pageid"
+ "SELECT sec, arch, name, pageid FROM mlinks "
+ "GROUP BY pageid"
") USING (pageid);",
-1, &stmt, NULL);
-/* $Id: mansearch.c,v 1.24 2014/04/20 16:44:44 schwarze Exp $ */
+/* $Id: mansearch.c,v 1.25 2014/04/23 16:33:37 schwarze Exp $ */
/*
* Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
sqlite3_finalize(s);
c = sqlite3_prepare_v2(db,
- "SELECT * FROM mlinks WHERE pageid=?"
- " ORDER BY sec, arch, name",
+ "SELECT sec, arch, name, pageid FROM mlinks "
+ "WHERE pageid=? ORDER BY sec, arch, name",
-1, &s, NULL);
if (SQLITE_OK != c)
fprintf(stderr, "%s\n", sqlite3_errmsg(db));
c = sqlite3_prepare_v2(db,
- "SELECT * FROM keys WHERE pageid=? AND bits & ?",
+ "SELECT bits, key, pageid FROM keys "
+ "WHERE pageid=? AND bits & ?",
-1, &s2, NULL);
if (SQLITE_OK != c)
fprintf(stderr, "%s\n", sqlite3_errmsg(db));
size_t sz;
int needop;
- sql = mandoc_strdup("SELECT * FROM mpages WHERE ");
+ sql = mandoc_strdup(
+ "SELECT desc, form, pageid FROM mpages WHERE ");
sz = strlen(sql);
for (needop = 0; NULL != e; e = e->next) {