mam taki widok:

  1. CREATE VIEW `search_view`
  2. AS
  3. SELECT `news`.`id`
  4. AS `id`,`news`.`title`
  5. AS `title`,`news`.`content`
  6. AS `content`,'news'
  7. AS `type` FROM `news`
  8. UNION SELECT `custom_pages`.`id`
  9. AS `id`,`custom_pages`.`title`
  10. AS `title`,`custom_pages`.`content`
  11. AS `content`,'custom_page'
  12. AS `type` FROM `custom_pages`
  13. UNION SELECT `classifieds`.`id`
  14. AS `id`,`classifieds`.`title`
  15. AS `title`,`classifieds`.`content`
  16. AS `content`,'classifieds'
  17. AS `type` FROM `classifieds` WHERE ((`classifieds`.`active` = 1) AND (unix_timestamp() >= `classifieds`.`date_start`) AND (unix_timestamp() <= `classifieds`.`date_end`))
  18. UNION SELECT `catalog`.`id`
  19. AS `id`,`catalog`.`company_name`
  20. AS `title`,`catalog`.`company_description`
  21. AS `content`,'catalog'
  22. AS `type` FROM `catalog`
  23. UNION SELECT `calendar`.`id`
  24. AS `id`,`calendar`.`title`
  25. AS `title`,`calendar`.`description`
  26. AS `content`,'calendar'
  27. AS `type` FROM `calendar` WHERE (convert(`calendar`.`date_end` USING utf8) >= convert(now() USING utf8))
  28. UNION SELECT `portal`.`panos`.`panos_id`
  29. AS `id`,`portal`.`panos_meta`.`title`
  30. AS `title`,`portal`.`panos`.`hash`
  31. AS `content`,'panos' AS `type` FROM (`portal`.`panos` JOIN `portal`.`panos_meta` ON((`portal`.`panos_meta`.`panos_id` = `portal`.`panos`.`panos_id`)));


czy da się wysłać set names utf8 przy union select z bazy portal ?
bo tam mam krzaki przy danych