promotion
#5

Heres the correct tables......

 

Next time do the work .....

sql.Format( "INSERT INTO t_new_promoitem"
"(a_index, a_section_type, a_item_idx, a_item_count, a_item_plus, a_item_flag)"
" VALUES"
" ( %d, %d, %d, %d, %d, %d )", index, sectionType, itemidx, itemCount, itemPlus, itemFlag );

DROP TABLE IF EXISTS `t_new_promoitem`;
CREATE TABLE `t_new_promoitem` (
`a_index` int(11) NOT NULL AUTO_INCREMENT,
`a_section_type` int(11) NOT NULL DEFAULT 0,
`a_item_idx` int(11) NOT NULL DEFAULT 0,
`a_item_count` int(11) NOT NULL DEFAULT 0,
`a_item_plus` int(11) NOT NULL DEFAULT 0,
`a_item_flag` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`a_index`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

sql.Format( "INSERT INTO t_new_promotion "
"( a_index, a_enable, a_use_state, a_section_string, a_section_type, a_start_date, a_end_date, a_use_date, a_key_string ) "
" VALUES ( %d, %d, %d, %s, %d, %s, %s, %s, %s ) "
, index, Enable, Use, strSectionString, SectionType, strStartDate, strEndDate, strUseDate, strKey );

DROP TABLE IF EXISTS `t_new_promotion`;
CREATE TABLE `t_new_promotion` (
`a_index` int(11) NOT NULL AUTO_INCREMENT,
`a_enable` int(11) DEFAULT NULL,
`a_use_state` int(11) DEFAULT NULL,
`a_section_string` varchar(255) DEFAULT NULL,
`a_section_type` varchar(255) DEFAULT NULL,
`a_start_date` datetime DEFAULT NULL,
`a_end_date` datetime DEFAULT NULL,
`a_use_date` datetime DEFAULT NULL,
`a_key_string` varchar(255) DEFAULT NULL,
PRIMARY KEY (`a_index`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;



Messages In This Thread
[No subject] - by Assasin - 08-22-2013, 07:50 PM
[No subject] - by CDWriter - 08-23-2013, 05:08 AM
[No subject] - by Assasin - 08-23-2013, 05:55 AM
[No subject] - by DrGenius - 08-23-2013, 06:28 AM
[No subject] - by CDWriter - 08-25-2013, 05:23 PM
[No subject] - by Assasin - 08-25-2013, 06:45 PM
[No subject] - by Nymphetamine - 08-25-2013, 07:33 PM
[No subject] - by Paramount - 08-26-2013, 09:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)