mirror of
https://github.com/kvazar-network/webapp.git
synced 2025-03-13 06:01:32 +00:00
fix data selection
This commit is contained in:
parent
808b11fb7d
commit
3e7beba89c
@ -35,7 +35,9 @@ class SQLite {
|
||||
|
||||
$query->execute([$namehash]);
|
||||
|
||||
return $query->rowCount() ? $query->fetch()['value'] : [];
|
||||
$result = $query->fetch();
|
||||
|
||||
return $result ? $result['value'] : false;
|
||||
|
||||
} catch(PDOException $e) {
|
||||
|
||||
@ -147,8 +149,9 @@ class SQLite {
|
||||
$query->execute();
|
||||
}
|
||||
|
||||
$result = $query->fetchAll();
|
||||
|
||||
return $query->rowCount() ? $query->fetchAll() : [];
|
||||
return $result ? $result : [];
|
||||
|
||||
} catch(PDOException $e) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user