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);