aboutsummaryrefslogtreecommitdiffstats
path: root/src/dblayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dblayer.c')
-rw-r--r--src/dblayer.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dblayer.c b/src/dblayer.c
index 4a356be..2e19c5a 100644
--- a/src/dblayer.c
+++ b/src/dblayer.c
@@ -431,3 +431,23 @@ int list_get_paths(DB *db, cklist *ckl) {
return 1;
}
+
+int list_get_programs(DB *db, cklist *ckl) {
+ sqlite3_stmt *stmt;
+ int rc;
+
+ char sql[STR_M];
+ dbh_form_query_select_programs(sql);
+
+ rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
+ if (rc != SQLITE_OK) {
+ return -2;
+ }
+
+ while (sqlite3_step(stmt) == SQLITE_ROW) {
+ list_add(ckl, (char *)sqlite3_column_text(stmt, 0));
+ }
+ sqlite3_finalize(stmt);
+
+ return 1;
+}