create table when make module in prestashop
Sample
return Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'braintree_paypalexpress_transaction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_customer` int(10) unsigned NOT NULL,
`id_cart` int(10) unsigned NOT NULL,
`id_order` int(10) unsigned DEFAULT NULL,
`id_transaction` varchar(32) NOT NULL,
`amount` decimal(10,2) NOT NULL,
`cart_detail` text DEFAULT NULL,
`date_add` datetime NOT NULL,
PRIMARY KEY (`id`),
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1');
Comments
Post a Comment