dbf_num_rec; $n=0; for($i=0;$i<$num_rec;$i++){ $row = $dbf->getRowAssoc($i); $index=iconv("CP852","UTF-8",$row['INDEKS']); $nazwa=$row['NAZWA']; if(mysql_num_rows(mysql_query("select name from ecmproducts where code like '".$index."' and deleted='0'"))==0){ echo $index." ".$nazwa."\n"; addProduct($index,$nazwa); $n++; } } echo $n; //} mysql_close($sql); ?>