From eca6f7f7046921a509650743bc3867bf541db010 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Sat, 15 Aug 2020 13:21:42 +0200 Subject: [PATCH] fix: typo --- CMakeLists.txt | 2 +- src/models/relay.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 878ef27..bc56696 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(core - VERSION 0.2.13 + VERSION 0.2.14 LANGUAGES C) add_executable(core src/main.c) diff --git a/src/models/relay.c b/src/models/relay.c index 9130faa..4533ae5 100644 --- a/src/models/relay.c +++ b/src/models/relay.c @@ -436,7 +436,7 @@ relay_get_controller_id_for_relay(int relay_id) { sqlite3_stmt *stmt; - sqlite3_prepare_v2(global_database, "SELECT controller_id FROM relays WHERE relay_id=?1;", -1, &stmt, NULL); + sqlite3_prepare_v2(global_database, "SELECT controller_id FROM relays WHERE id=?1;", -1, &stmt, NULL); sqlite3_bind_int(stmt, 1, relay_id); return database_helper_get_id(stmt);