title: create mysql views with UNION operator on query
body: <p>I am trying to create sql view with a UNION operator on it. I tried executing the sql first before embedding it to the view and the result is success. But when I try it to embed on creating a view it returned this error </p>
  
  <p>"Error Code : 1064
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION
  SELECT p.product_media_id AS media_id, p.product_title AS title, p.product' at line 8
  "</p>
  
  <p>I also assure that all columns have the same data type.</p>
  
  <p>SQL view:</p>
  
  <pre><code>CREATE
  /*[ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
  [DEFINER = { user | CURRENT_USER }]
  [SQL SECURITY { DEFINER | INVOKER }]*/
  VIEW `mydbname`.`s_views` 
  AS
  (SELECT c.media_id AS media_id, 
      c.title AS title, 
      c.title_slug AS slug, 
      c.content_one      AS description, 
      c.type AS cat 
  FROM content_content c 
  WHERE c.type = 'news' 
      OR c.type='travel_genius' 
      AND c.media_id IS NOT NULL 
      AND c.status = 1
  UNION
  SELECT p.product_media_id AS media_id, 
      p.product_title AS title, 
      p.product_title_slug   AS slug, 
      p.product_description AS description, 
      'product' AS cat 
  FROM p_views p
  WHERE p.product_media_id IS NOT NULL);
  </code></pre>