To use a PHP regular expression to read the following text file, read the Date,time and add the current year as written: 2013-07-03 17:22, there is a NMBR phone number read out, and generate a loop of MySQL statements coexist into the MySQL database.
RINGRINGDATE = 0703 TIME = 1722NMBR = 13332415858RINGRINGDATE = 0704 TIME = 0812 NMBR = 04124834444RINGRING
Become:
insert into calllog (datetime,phonenumber ) values ('2013-07-03 17:22','13332415858');insert into calllog (datetime,phonenumber ) values ('2013-07-04 08:12','04124834444');
Reply content:
To use a PHP regular expression to read the following text file, read the Date,time and add the current year as written: 2013-07-03 17:22, there is a NMBR phone number read out, and generate a loop of MySQL statements coexist into the MySQL database.
RINGRINGDATE = 0703 TIME = 1722NMBR = 13332415858RINGRINGDATE = 0704 TIME = 0812 NMBR = 04124834444RINGRING
Become:
insert into calllog (datetime,phonenumber ) values ('2013-07-03 17:22','13332415858');insert into calllog (datetime,phonenumber ) values ('2013-07-04 08:12','04124834444');