chiark / gitweb /
WIP route value calculation - compiles, although doesn't run the LP
[ypp-sc-tools.main.git] / yarrg / rssetup.c
index e169dd5d323cfe8a9113313bc5b45af3aa3502ff..88b6fc6851a91a6775160d20ac454daec788670a 100644 (file)
@@ -23,6 +23,15 @@ void setup(void) {
   setup_value();
 }
 
+int sql_single_int(const char *stmt) {
+  sqlite3_stmt *sst;
+  SQL_MUST( sqlite3_prepare(db, stmt, -1,&sst,0) );
+  assert( SQL_STEP(sst) );
+  int rv= sqlite3_column_int(sst,0);
+  sqlite3_finalize(sst);
+  return rv;
+}
+
 int sql_step_wrap(sqlite3_stmt *ssh, const char *ssh_string,
                  const char *file, int line) {
   for (;;) {