static function getClientsById($id) { openSQLConnection(); $q = "SELECT * FROM client WHERE id = ?;"; $rows = SQL($q, $id); $clients = []; if (!empty($rows)) { foreach ($rows as $name => $value) { $clients[] = Client::fromJSON(json_encode($value)); } } return $clients; }