I flawlessly installed the SVN version of catalog, thank you for supporting! :-)
How can I use the "calculate" field to get what I need? It seems to me to be a field type oriented to math calculation (the example below the 'calculation formula' field is 'Enter the SQL calculation for the field, e.g. (price*1.15)*qty.'), how can I use it to extract the data I want and - most of all - to save the right data I need into the table?
The table with the reference is
	Code:
	CREATE TABLE `cat_opera` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL,
  `sorting` int(10) unsigned NOT NULL DEFAULT '0',
  `tstamp` int(10) unsigned NOT NULL DEFAULT '0',
  `nome` varchar(255) NOT NULL DEFAULT '',
  `descrizione` text,
  `immagine` text,
  `deleted` char(1) NOT NULL DEFAULT '',
  `artist` int(10) NOT NULL DEFAULT '0',
  `id_opera` varchar(255) NOT NULL DEFAULT '',
  `tipologia` int(10) NOT NULL DEFAULT '0',
  `tags` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8$$
 the table I'm editing is
	Code:
	CREATE TABLE `cat_componenti_opera` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL,
  `sorting` int(10) unsigned NOT NULL DEFAULT '0',
  `tstamp` int(10) unsigned NOT NULL DEFAULT '0',
  `componente_reference` int(10) NOT NULL DEFAULT '0',
  `opera_reference` varchar(255) NOT NULL DEFAULT '',
  `quantity` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8$$
 where opera_reference is the reference to opera -> id
What I'd like to see is a combo box with a value which is the concatenation of opera->id and opera->nome, but I want to save in cat_componenti_opera->opera_reference just the ID. Can I do that with the calculate fieldtype?
Thank you
						
					
Bookmarks