Browse Source

fix data selection

pull/8/head
ghost 3 years ago
parent
commit
3e7beba89c
  1. 7
      library/sqlite.php

7
library/sqlite.php

@ -35,7 +35,9 @@ class SQLite {
$query->execute([$namehash]); $query->execute([$namehash]);
return $query->rowCount() ? $query->fetch()['value'] : []; $result = $query->fetch();
return $result ? $result['value'] : false;
} catch(PDOException $e) { } catch(PDOException $e) {
@ -147,8 +149,9 @@ class SQLite {
$query->execute(); $query->execute();
} }
$result = $query->fetchAll();
return $query->rowCount() ? $query->fetchAll() : []; return $result ? $result : [];
} catch(PDOException $e) { } catch(PDOException $e) {

Loading…
Cancel
Save