<?php
    
    class City extends Core {

        function list() {

            $initials = $_GET['initials'];
            $sql = "SELECT a1.* FROM city as a1 LEFT JOIN states as a2 ON a2.id = a1.state WHERE initials = ?";
            $stmt = parent::$conn->prepare($sql);
            $stmt->execute([$initials]);

            return $stmt->fetchAll(PDO::FETCH_ASSOC);

        }

    }