"select 'b' as src, house_id, user_id, lang_id, lat, lon, " +
                  
                  
                                  "       square, null as livesquare, null as plottage, 0 as heat, btype, null as yearc, " +
                  
                  
                                  "       sewerage, 0 as rooms, floors, null as basement, price, round(extract(epoch from expire) * 1000) as expire, " +
                  
                  
                                  "       active, vip, 0 as kitchen, 0 as pledge, info, moreinfo, " +
                  
                  
                                  "       currency_id, radius, 0 as time_rent_id, 2 as exchange " +
                  
                  
                                  "from houses_buy, const " +
                  
                  
                                  "where user_id = uID and deleted = false " +
                  
                  
                                  "union all " +
                  
                  
                                  "select 's' as src, house_id, user_id, lang_id, lat, lon, " +
                  
                  
                                  "       square, livesquare, plottage, heat, btype, yearc, " +
                  
                  
                                  "       sewerage, rooms, floors, basement, price, round(extract(epoch from expire) * 1000) as expire, " +
                  
                  
                                  "       active, vip, kitchen, pledge, info, moreinfo, " +
                  
                  
                                  "       currency_id, 0 as radius, 0 as time_rent_id, exchange " +
                  
                  
                                  "from houses_sale, const " +
                  
                  
                                  "where user_id = uID and deleted = false " +
                  
                  
                                  "union all " +
                  
                  
                                  "select 'r' as src, house_id, user_id, lang_id, lat, lon, " +
                  
                  
                                  "       square, null as livesquare, null as plottage, 0 as heat, 0 as btype, null as yearc, " +
                  
                  
                                  "       0 as sewerage, rooms, floors, null as basement, price, round(extract(epoch from expire) * 1000) as expire, " +
                  
                  
                                  "       active, vip, 0 as kitchen, 0 as pledge, info, moreinfo, " +
                  
                  
                                  "       currency_id, radius, time_rent_id, 2 as exchange " +
                  
                  
                                  "from houses_rent, const " +
                  
                  
                                  "where user_id = uID and deleted = false " +
                  
                  
                                  "union all " +
                  
                  
                                  "select 'o' as src, house_id, user_id, lang_id, lat, lon, " +
                  
                  
                                  "       square, null as livesquare, null as plottage, 0 as heat, 0 as btype, null as yearc, " +
                  
                  
                                  "       0 as sewerage, rooms, floors, null as basement, price, round(extract(epoch from expire) * 1000) as expire, " +
                  
                  
                                  "       active, vip, 0 as kitchen, 0 as pledge, info, moreinfo, " +
                  
                  
                                  "       currency_id, 0 as radius, time_rent_id, 2 as exchange " +
                  
                  
                                  "from houses_rent_out, const " +
                  
                  
                                  "where user_id = uID and deleted = false";
                  
                  
                
ну норм базу тестишь
Обсуждают сегодня