数组结果在我的UNION查询中变为0

   <?php
    $con=mysql_connect("localhost","root","");
     if (!$con)
      {
      die('Could not connect: ' . mysql_error());
   }
mysql_select_db("dbjobsheets", $con);
     $result = mysql_query ("select * from checklist union select * from checklistdailylogs;");

   while($row = mysql_fetch_array($result));

i tried everything in google but no luck. i tried also the join command and i got an error of mysql_fetch_array() expects parameter 1 to be resource.

still error in fetch array.

  $result = mysql_query ("select frequency from checklist union select daily from checklistdailylogs;");

i got no error on this but when i try to add another column like this

$result = mysql_query ("select frequency, sla from checklist union select daily, actualstart from checklistdailylogs;"); 

got mysql_fetch_array() expects parameter 1 to be resource.

Your brackets are outside the SQL string, also your second table has no fields specified and the missing from for the other table selection; I assume you mean:

$result = mysql_query("(select * from checklist) UNION (select * from checklistdailylogs)");