promotion
#1

Hi i have small problem i not have this tabele how to cerate??

 

 

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  );
#2

look at your PM @2....

 

for anyone else the table is 

 

CREATE TABLE `t_new_promotion` (
  `a_index` int(11) NOT NULL AUTO_INCREMENT,
  `a_enable` int(11) NOT NULL DEFAULT 0,
  ` a_use_state` int(11) NOT NULL DEFAULT 0,
  `a_section_string` int(11) NOT NULL DEFAULT 0,
  `a_section_type` int(11) NOT NULL DEFAULT 0,
  `a_start_date`  datetime DEFAULT NULL,
  `a_end_date`  datetime DEFAULT NULL,
  `a_use_date`  datetime DEFAULT NULL,
  `a_key_string` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`a_index`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
#3
i have done 100%

#4
if you solved ur problem please remember to put the tag solved into the title of the topic

#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;

#6
thx good work :-)

#7
Did u solve ur problem?

#8

Seems like yes, if he said Thx good work.

Marked as solved & moved.



Forum Jump:


Users browsing this thread: 1 Guest(s)