01.
$i
= 1;
02.
while
(
$excel
->getActiveSheet()->getCell(
'A'
.
$i
)->getValue() !=
""
){
03.
04.
$id
=
$excel
->getActiveSheet()->getCell(
'A'
.
$i
)->getValue();
05.
$loca
=
$excel
->getActiveSheet()->getCell(
'B'
.
$i
)->getValue();
06.
$proj
=
$excel
->getActiveSheet()->getCell(
'C'
.
$i
)->getValue();
07.
$month
=
$excel
->getActiveSheet()->getCell(
'D'
.
$i
)->getValue();
08.
$search
=
array
(
'42979'
,
'42948'
);
09.
$replace
=
array
(
'Sep-17'
,
'Aug-17'
);
10.
$date
=
str_replace
(
$search
,
$replace
,
$month
);
11.
$age
=
$excel
->getActiveSheet()->getCell(
'E'
.
$i
)->getValue();
12.
$user
=
$excel
->getActiveSheet()->getCell(
'F'
.
$i
)->getValue();
13.
14.
$qu
=
"INSERT INTO `age` (ID, Location, Project, Month_Of_Date, Age, Users) VALUES ('"
.
$id
.
"', '"
.
$loca
.
"', '"
.
$proj
.
"', '"
.
$date
.
"', '"
.
$age
.
"', '"
.
$user
.
"')"
;
15.
$queryu
= mysql_query(
$qu
);
16.
17.
$i
++;
18.
}