<?php 
	require(__DIR__.'/connect.php'); break; // listo
	$db = new connect('visionwe_mateckoriginal','visionwe_matecku','7Z}jf_6}{KZ]');
	$mateck = new connect('visionwe_mateckkdb','visionwe_matecku','7Z}jf_6}{KZ]');

	
	echo "<br/><br/>Registrando descripciones ...<br/>";
	
	$query ="
	SELECT 
		p.products_id,
		d.language_id,
		d.products_name,
		d.products_description,
		d.gm_url_keywords
			FROM 
				products p left join products_description d on p.products_id = d.products_id
			WHERE 
				1
			ORDER BY p.products_id ASC 
		";
	$productos = $db->getRows($query); 
	foreach($productos as $producto):
		$idProducto = $producto['products_id'];
		if($producto['language_id']==1)
			$lang=1;
		else
			$lang=2;
		
		$sql='insert into ax_product_lang(id_product, id_shop, id_lang, name, description, link_rewrite)';
		$sql.='values("'.$idProducto.'", "1", "'.$lang.'", "'.$producto['products_name'].'", "'.$producto['products_description'].'", "'.$producto['gm_url_keywords'].'")';
		echo $sql.'--Se registro un producto...<br/>';
		$mateck->insertRow($sql);
		
	endforeach;
	echo "Fin de la consulta";
	
	