<?php
  require_once('include_classes.inc');

  	$tabOBJ = new  Med_functions();
	$v_table_name= $_POST["v_table"];
	$v_field_name= $_POST["v_field_name"];
  	$result = $tabOBJ->getTableDescription(strtolower($v_table_name));
	while($row = $result->fetch_row()){
		if(strtoupper($row[0])== strtoupper($v_field_name )){
			$v_str= $row[1];
		}
	}
	$result->close();
	if(strpos($v_str,'(')== false){
		echo "0";
	}else {
		$v_firt= strripos($v_str,'(');
		$v_last= strrpos($v_str,')');
		echo substr($v_str,($v_firt+1),($v_last-$v_firt)-1);
	}
?>
