<?php
if (!$_REQUEST['product_id']) {echo 'error'; return;}

$info = array();

$row = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT type FROM ecmproducts WHERE id='".trim($_REQUEST['product_id'])."'"));

	if($row) { 
		$info[] = $row;
	} else {echo 'no'; return;}
	
	$json = getJSONobj();
	echo str_replace(",", '.', $json->encode($info));
?>