<?php
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
$s="SELECT * FROM ginterna WHERE gi_fec>='2020-01-01' ORDER BY id_gi";
$rs=grs($s);				
while($r=$rs->fetch_assoc()){
	$KOD=$r['id_gi'];
	$CX=gn("count(*)","ginterna_det","id_gi=$KOD");
	if($KOD==0){
		echo "ERROR ".$KOD."<br>";
	}
}
echo "OK";
?>