Reply
mysql table - multiple information
Old 11-01-2009, 02:37 PM mysql table - multiple information
Novice Talker

Posts: 12
Trades: 0
Hi

I have some code made up for my oscommerce webshop

Basically its a coupons modification, but im having a problem with my database configuration.

Basically I can choose multiple products to apply a discount to
however, when it goes into the database it only stores the 1st one

how, or where do i get it to store many

this is my table

Quote:
CREATE TABLE IF NOT EXISTS `coupons` (
`coupons_id` int(10) unsigned NOT NULL auto_increment,
`coupons_code` varchar(32) NOT NULL,
`coupons_value` decimal(15,4) NOT NULL,
`product_ids` int(10) unsigned NOT NULL,
`type` varchar(32) NOT NULL,
`num_times` int(11) NOT NULL default '0',
`total_times` int(11) NOT NULL default '0',
`coupons_notice` varchar(250) NOT NULL,
`coupons_min_order` int(11) NOT NULL default '0',
`coupons_date` date default NULL,
PRIMARY KEY (`coupons_id`),
KEY `idx_code` (`coupons_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
`product_ids` int(10) unsigned NOT NULL,

is the row it goes into - how do i make take multiple numbers

Thanks
ronnieb is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-01-2009, 03:20 PM Re: mysql table - multiple information
chrishirst's Avatar
Super Moderator

Posts: 22,223
Location: Blackpool. UK
Trades: 0
use another table where the discounted products ids are stored
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to mysql table - multiple information
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10131 seconds with 13 queries