脚本宝典收集整理的这篇文章主要介绍了php – 这是一个很好的会员支付数据库架构吗?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
正如您将看到的,拥有月,年NULL-ABLE的想法允许保存任何其他付款的记录
CREATE TABLE IF NOT EXISTS `orders` ( `id` int(11) NOT NULL auto_increment,`partner_id` int(11) NOT NULL,`status` enum('PEnding','accepted','cancelled','other') NOT NULL,`created_on` datetime NOT NULL,`concept` vArchar(250) NOT NULL,`type` enum('membership','other') NOT NULL default 'membership',`source` enum('dineromail','casati','deposIT','other') NOT NULL default 'dineromail',`notes` text NULL,`last_check_on` datetime default NULL,Primary KEY (`id`) ) ENginE=MyISam ; CREATE TABLE IF NOT EXISTS `payments` ( `id` int(11) NOT NULL auto_increment,`order_id` int(11) NOT NULL,`month` int(11) default NULL,`year` int(11) default NULL,`amount` float NOT NULL,PRIMARY KEY (`id`),unique KEY `idx-order_id-month-year` (`order_id`,`month`,`year`) ) ENGINE=MyISAM ; CREATE TABLE IF NOT EXISTS `partners` ( `id` int(10) unsigned NOT NULL auto_increment,`name` VARchar(255) default NULL,`last_name` varchar(255) default NULL,) ENGINE=MyISAM;
以上是脚本宝典为你收集整理的php – 这是一个很好的会员支付数据库架构吗?全部内容,希望文章能够帮你解决php – 这是一个很好的会员支付数据库架构吗?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。