时间:2021-07-01 10:21:17 帮助过:4人阅读
RING
RING
DATE = 0703
TIME = 1722
NMBR = 13332415858
RING
RING
DATE = 0704
TIME = 0812
NMBR = 04124834444
RING
RING
变成:
insert into calllog (datetime,phonenumber ) values ('2013-07-03 17:22','13332415858');
insert into calllog (datetime,phonenumber ) values ('2013-07-04 08:12','04124834444');
想使用PHP正则表达式读取下面的文本文件,将date,time读取 并加上当前的年 写成: 2013-07-03 17:22,还有NMBR的电话号码读出,并生成一个循环的mysql语句 并存入到mysql数据库中.
RING
RING
DATE = 0703
TIME = 1722
NMBR = 13332415858
RING
RING
DATE = 0704
TIME = 0812
NMBR = 04124834444
RING
RING
变成:
insert into calllog (datetime,phonenumber ) values ('2013-07-03 17:22','13332415858');
insert into calllog (datetime,phonenumber ) values ('2013-07-04 08:12','04124834444');