- 'SELECT loc_id FROM geodb_textdata'
- . ' WHERE text_type = "500400000"'//area code
- . ' AND text_val = ' . $this->db->quote($areacode)
+ 'SELECT name FROM my_orte'
+ . ' WHERE vorwahl = ' . $this->db->quote(substr($number, 0, 3))
+ . ' OR vorwahl = ' . $this->db->quote(substr($number, 0, 4))
+ . ' OR vorwahl = ' . $this->db->quote(substr($number, 0, 5))
+ . ' OR vorwahl = ' . $this->db->quote(substr($number, 0, 6))
+ . ' ORDER BY einwohner DESC'