mirror of
https://github.com/Motion-Project/motion.git
synced 2025-12-23 23:18:21 -05:00
Fix column listing for sqlite database
This commit is contained in:
@@ -155,8 +155,13 @@ void cls_dbse::sql_motion(std::string &sql)
|
||||
sql += ");";
|
||||
|
||||
} else if ((dbse_action == DBSE_COLS_LIST) || (dbse_action == DBSE_COLS_CURRENT)) {
|
||||
sql = " select * from motion;";
|
||||
|
||||
if ((app->cfg->database_type == "mariadb") ||
|
||||
(app->cfg->database_type == "postgresql")) {
|
||||
sql = " select * from motion;";
|
||||
} else if (app->cfg->database_type == "sqlite3") {
|
||||
/*empty tables do not trigger the callback*/
|
||||
sql = " select t.* from (select 1) left join 'motion' as t;";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user