query($query); if (static::$interface->sqlstate !== "00000") { throw new \Exception(static::$interface->error); } } return true; } protected function query(string $q) { $r = static::$interface->query($q); if ($r) { $row = $r->fetch_row(); $r->free(); if ($row) { return $row[0]; } else { return null; } } return null; } }