Jayaprakash7
5/24/2017 - 1:18 PM

MySql Query

MySql Query

CREATE TABLE  `admin_lodore`.`suggest_products` (
`_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 32 ) NOT NULL ,
`parent` INT( 11 ) NOT NULL ,
`image` VARCHAR( 255 ) NOT NULL ,
`block` INT( 2 ) NOT NULL ,
`description` VARCHAR( 32 ) NOT NULL ,
`updated` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`size` VARCHAR( 32 ) NOT NULL ,
`concentration` VARCHAR( 32 ) NOT NULL ,
`perfume_type` VARCHAR( 32 ) NOT NULL ,
`occasion` VARCHAR( 32 ) NOT NULL ,
`perfume_family` VARCHAR( 32 ) NOT NULL ,
`price` VARCHAR( 32 ) NOT NULL ,
`perfume_story` TEXT NOT NULL ,
PRIMARY KEY (  `_id` )
) ENGINE = INNODB;
INSERT INTO suggest_products(_id,
                           name,
                          parent,
                           image,block,description,updated,size,concentration,perfume_type,occasion,perfume_family,price,perfume_story)
   SELECT _id,name,parent,image,block,description,updated,size,concentration,perfume_type,occasion,perfume_family,price,perfume_story
    FROM category;