Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need mysql help.. asap please


Graveyard666

Recommended Posts

I need to have a script which does the following:

 

 

i somehow need a way for a sql query to run in which every product id would receive the exact same product attributes. this is for a tshirt shop so all the attributes are sizes

 

there's only about 200-250 items this needs to be applied to, but i dont know the product_id of each item.

 

any ideas on how to accomplish this?

 

the "5" would need to change for each product id, the ids for the sizes are: 5,6,14,15,16,17,18,19,21,

 

 

based on this query..

 

INSERT INTO `products_attributes` VALUES (45, 87, 2, 5, 0.0000, '+');

 

 

CREATE TABLE `products_attributes` (

`products_attributes_id` int(11) NOT NULL auto_increment,

`products_id` int(11) NOT NULL default '0',

`options_id` int(11) NOT NULL default '0',

`options_values_id` int(11) NOT NULL default '0',

`options_values_price` decimal(15,4) NOT NULL default '0.0000',

`price_prefix` char(1) collate latin1_general_ci NOT NULL default '',

PRIMARY KEY (`products_attributes_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=281 ;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...