$wpdb is global, if I do an echo $query for debugging reasons, it shows me the complete and correct MySQL-query. But $pages is always an empty array.
This error only occurs when post_status='static' is included. Can anybody tell me why?