title: #1271 - Illegal mix of collations for operation 'UNION' in like query
body: <p>I have checked the collation type of each table, and that they have the same collation.</p>
  
  <p>Error: #1271 - Illegal mix of collations for operation 'UNION'</p>
  
  <p>Please see the below query:</p>
  
  <pre><code>$query = "(SELECT id, product_name, description, 'tbl_landt' as type FROM                                      tbl_landt WHERE product_name LIKE '%" . 
            $keyword . "%' OR description LIKE '%" . $keyword ."%') 
             UNION
             (SELECT id, name, null, 'tbl_land_cat' as type FROM tbl_land_cat WHERE name LIKE '%" . $keyword . "%') 
             UNION
             (SELECT tbl_sub_cat.id, tbl_sub_cat.name AS cat_name, null, 'tbl_sub_cat' as type FROM tbl_sub_cat WHERE name LIKE '%" . $keyword . "%')
             UNION
             (SELECT id, name, null, 'tbl_exl_cat' as type FROM tbl_exl_cat WHERE name LIKE '%" . $keyword . "%')";
             $squery = mysql_query($query);
  </code></pre>