function getListSQL($query, $class) {

        $connection = $this->getConnection();


        $result = mysql_query($query, $connection);

        if (!$result) {
            die('Error: ' . mysql_error());
        }

        $list = array();

        while ($row = mysql_fetch_array($result)) {
            $instance = new $class;
            $instance->hidrate($row);
            $list[] = $instance;
        }

        mysql_close($connection);

        return $list;
    }