2
我该如何自动用php代码填充mysql数据库查询?如何使用php自动完成mysql数据库?
数据库,如下所示:
CREATE TABLE IF NOT EXISTS `scrore_table` (
`scores_id` int(11) NOT NULL auto_increment,
`scores_title` varchar(32) collate utf8_bin NOT NULL default '',
`scores` varchar(15) collate utf8_bin NOT NULL default '',
`decimal_place` char(1) collate utf8_bin NOT NULL,
`value` float(15,8) NOT NULL,
PRIMARY KEY (`currency_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ;
INSERT INTO `scrore_table` (`scrore_id`, `scrore_title`, `scores`, `decimal_place`, `value`) VALUES
(1, '', 'GameA0', '',),
(2, '', 'GameA1', '',),
(3, '', 'GameA2', '',),
..............................etc
(15, '', 'GameA15', '',);
成为标杆(关键词)分别是:得分,所以
IF found
scores = GameA0
then insert
scores_title = Game For Player A0
decimal_place = 2
value = 1.58030000
IF found
scores = GameA1
then insert
scores_title = Game For Player A1
decimal_place = 2
value = 158.030000
IF found
scores = GameA15
then insert
scores_title = Game For Player A15
decimal_place = 2
value = 0.31303000
等等
任何建议和指针,以帮助我,我感谢和非常感谢
您是否希望有一个基于PHP的代码具有值运行MySQL的插入PHP代码? – 2010-11-11 14:04:44