public function lookup($remoteAddress) { return null; // $query = "SELECT * FROM `ip2location_db3` WHERE INET_ATON(:ip) <= ip_to LIMIT 1"; $result = $this->connection->fetchAssoc($query, ['ip' => $remoteAddress]); if ($result) { return new RemoteAddressEntry($result['country_code'] === '-' ? null : $result['country_code'], $result['country_name'] === '-' ? null : $result['country_name'], $result['region_name'] === '-' ? null : $result['region_name'], $result['city_name'] === '-' ? null : $result['city_name']); } return null; }
public function select($id) { return $this->conn->fetchAssoc('select * from todo where id = :id', ['id' => $id]); }
public function select(Connection $conn, $id) { return $conn->fetchAssoc('select * from todo where id = :id', ['id' => $id]); }