I have a problem with a UNION query. This is the query: http://pastebin.dk/index.php?show=2613 The resulting array is the following: array(2) { ["current"]=> string(1) "1" ["force_fallback"]=> string(1) "1" } In my mind it should give the following array: array(2) { ["current"]=> string(1) "1" ["force_fallback"]=> string(1) "1", ["default"]=> string(1) "2" } I'm using MySQL 5.1.14-beta-community-nt, and when running the queries seperatly I get the proper fields, ["current"] and ["force_fallback"] or ["default"] and ["force_fallback"] I'm really uncertain of how to fix this.
Why are you using the union for this ? Isn't it easier to adjust your where clause to look liek this: WHERE `page` = "index" AND (`language` = "' . $this->lang . ' OR `language` = "' . $this->_default_lang . '")'; (give or take some quotes ;-))