Muk*_*esh 1 magento magento-1.7
对于我的自定义模块之一,我有以下sql安装脚本
$installer = $this;
$installer->startSetup();
$installer->run("
CREATE TABLE {$this->getTable('wholesale')} (
`wholesale_id` int(11) unsigned NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`percentage` float(5,3) NOT NULL,
`status` smallint(6) NOT NULL default '0',
`created_time` datetime NULL,
`update_time` datetime NULL,
PRIMARY KEY (`wholesale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
");
$installer->endSetup();
Run Code Online (Sandbox Code Playgroud)
传递给此百分比的值float(5,3)NOT NULL,列以十进制保存,但始终以00为例。如果我保存一个值10.23,它将另存为10.00。
请帮忙