<?

include("conex_ver.php");
con_ver();
$q=mysqli_query("SELECT fecha_recepcion, `booking` , fechaRegistro
FROM `hblexpint`
WHERE fecha_recepcion <> '0000-00-00'
AND `fechaRegistro`
BETWEEN '2015-10-01'
AND '2015-10-31'");

include("coneximpo.php");

?>
zlo
<table width="200" border="1">
  <tr>
    <td>booking</td>
    <td>fecha_recepcion</td>
    <td>fechaRegistro</td>
    <td>eta port interteam</td>
    <td>status 20</td>
  </tr>
  <? while($r=mysqli_fetch_array($q)){
	  $q1=mysqli_query("select eta_port,status20 from bookingexpint where booking_interteam='".$r[booking]."'");
	  echo "select eta_port,status20 from bookingexpint where booking_interteam='".$r[booking]."'<br>";
	  $r1=mysqli_fetch_array($q1);
	  if($r1[status20]*1==0 and $r1[eta_port]==''){
		  mysqli_query("update bookingexpint set eta_port = '".$r[fecha_recepcion]."' where booking_interteam = '".$r[booking]."'");
		  echo mysqli_error();
	  }
	  ?>
  <tr  <?=$r1[status20]*1==0 ? 'style="background-color:#9F0"' :''?>>
    <td><?=$r[booking]?></td>
    <td><?=$r[fecha_recepcion]?></td>
    <td><?=$r[fechaRegistro]?></td>
    <td><?=$r1[eta_port]?></td>
    <td><?=$r1[status20]?></td>
  </tr>
  <? } ?>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>