diff --git a/QnetDB.cpp b/QnetDB.cpp index 7a0858a..bc16880 100644 --- a/QnetDB.cpp +++ b/QnetDB.cpp @@ -51,17 +51,17 @@ bool CQnetDB::Update(const char *mycall, const char *sfx, const char *urcall, co { if (NULL == db) return false; - std::string sql = "REPLACE INTO LHEARD (mycall,sfx,urcall,module,gateway,lasttime) VALUES ("; + std::string sql = "REPLACE INTO LHEARD (mycall,sfx,urcall,module,gateway,lasttime) VALUES ('"; sql.append(mycall); - sql.append("\",\""); + sql.append("','"); sql.append(sfx); - sql.append("\",\""); + sql.append("','"); sql.append(urcall); - sql.append("\",\""); + sql.append("','"); sql.append(module); - sql.append("\",\""); + sql.append("','"); sql.append(gateway); - sql.append("\","); + sql.append("',"); sql.append("strftime('%s','now'));"); char *eMsg; diff --git a/example.php b/example.php index 3166ec3..d7e56d5 100644 --- a/example.php +++ b/example.php @@ -31,6 +31,7 @@ function GetCFGValue(string $key) { + global $cfg, $defaults; if (array_key_exists($key, $cfg)) return $cfg[$key]; if ('module_' == substr($key, 0, 7)) {