mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
fix mariadb parsing with mysql (#5488)
This commit is contained in:
parent
fed8f021f2
commit
13ead1ddeb
1 changed files with 5 additions and 1 deletions
4
db.js
4
db.js
|
@ -1244,7 +1244,11 @@ module.exports.CreateDB = function (parent, func) {
|
||||||
var docs = [];
|
var docs = [];
|
||||||
for (var i in results) {
|
for (var i in results) {
|
||||||
if (results[i].doc) {
|
if (results[i].doc) {
|
||||||
|
if (typeof results[i].doc == 'string') {
|
||||||
|
docs.push(JSON.parse(results[i].doc));
|
||||||
|
} else {
|
||||||
docs.push(results[i].doc);
|
docs.push(results[i].doc);
|
||||||
|
}
|
||||||
} else if ((results.length == 1) && (results[i]['COUNT(doc)'] != null)) {
|
} else if ((results.length == 1) && (results[i]['COUNT(doc)'] != null)) {
|
||||||
// This is a SELECT COUNT() operation
|
// This is a SELECT COUNT() operation
|
||||||
docs = results[i]['COUNT(doc)'];
|
docs = results[i]['COUNT(doc)'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue