<?php
$z="select document_no,parent_name,total from ecminvoiceouts where 
register_date>'2008-01-01' and 
(to_nip='' or to_nip is null) and 
(to_vatid='' or to_vatid is null) and 
deleted='0' and
parent_name not like 'carrefour%' and
parent_name not like 'makro%' and
parent_name not like 'ntt%' and
parent_name not like 'real%' and
parent_name not like 'euro%' and
parent_name not like '\"real%' and
parent_name not like 'media%' and
parent_name not like 'netto%' and
parent_name not like 'inter%' and
parent_name not like 'domar%' and
parent_name not like 'ahold%' and
parent_name not like 'cp%' and
parent_name not like 'saturn%' and
parent_name not like 'carrefour%' and
parent_name not like 'carrefour%'";
$w=mysql_query($z);
while($r=mysql_fetch_array($w)){
	echo $r['document_no']." ".$r['parent_name']." ".$r['total']."<br>";
}
?>