Welcome Guest, Not a member yet? Register   Sign In
Store data data from multiple fields
#4

[eluser]Lykos22[/eluser]
Well you can see below in mysql what I want to achieve, either when I add new values, or when editing existing ones:
Code:
--
-- Table structure for table `product_features`
--

CREATE TABLE IF NOT EXISTS `product_features` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(11) unsigned DEFAULT NULL,
  `feature_id` int(11) unsigned DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;

--
-- Dumping data for table `product_features`
--

INSERT INTO `product_features` (`id`, `product_id`, `feature_id`, `value`) VALUES
(1, 1, 1, NULL),
(2, 1, 2, value2),
(3, 1, 3, value3),
(4, 1, 4, value4),
(5, 1, 8, NULL),
(6, 2, 1, another_value1),
(7, 2, 2,  another_value2),
(8, 2, 3, NULL),
(9, 2, 4, another_value4),
(10, 3, 1, NULL),
(11, 3, 2, yet_another_value2);


Messages In This Thread
Store data data from multiple fields - by El Forum - 10-10-2013, 04:47 AM
Store data data from multiple fields - by El Forum - 10-10-2013, 09:17 AM
Store data data from multiple fields - by El Forum - 10-11-2013, 02:27 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 02:00 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 03:05 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 03:31 AM
Store data data from multiple fields - by El Forum - 10-12-2013, 04:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB