Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not showing all data in the file #185

Open
dadihkung opened this issue Feb 24, 2023 · 1 comment
Open

not showing all data in the file #185

dadihkung opened this issue Feb 24, 2023 · 1 comment

Comments

@dadihkung
Copy link

so i have this issue that it could only show the last 2 of the data. i have the same page using the code i made and it worked. but when i tried it on another page it only shows the last two of the data

// here is the excel file im using
gogogogo.xlsx

and here is the code i use:

// import data excel mulai baris ke-2 (karena baris pertama adalah nama kolom)
foreach ($Reader as $Key => $Row)
{
if ($Key < 5) continue;
$himpunan_id = fn_petik(str_replace('$','',$Row[1]));
$kelompok_id = fn_petik(str_replace('`','',$Row[2]));
$tanggal_daftar = fn_petik(str_replace('$','',$Row[3]));
$nama_lengkap = fn_petik(str_replace('$','',$Row[4]));
$jenis_kelamin = fn_petik(str_replace('$','',$Row[5]));
$no_hp = fn_petik(str_replace('$','',$Row[6]));
$tempat_lahir = fn_petik(str_replace('$','',$Row[7]));
$tanggal_lahir = fn_petik(str_replace('$','',$Row[8]));
$no_ktp = fn_petik(str_replace('$','',$Row[9]));
$alamat_lengkap = fn_petik(str_replace('$','',$Row[10]));
$email = fn_petik(str_replace('$','',$Row[11]));
$status = fn_petik(str_replace('$','',$Row[12]));
$remark = fn_petik(str_replace('$','',$Row[13]));

                          $sql = "INSERT INTO data_anggota SET
                              himpunan_id = '$himpunan_id',
                              kelompok_id = '$kelompok_id',
                              tanggal_daftar = '$tanggal_daftar',
                              nama_lengkap = '$nama_lengkap',
                              jenis_kelamin = '$jenis_kelamin',
                              no_hp = '$no_hp',
                              tempat_lahir = '$tempat_lahir',
                              tanggal_lahir = '$tanggal_lahir',
                              no_ktp = '$no_ktp',
                              alamat_lengkap = '$alamat_lengkap',
                              email = '$email',
                              status = '$status',
                              remark = '$remark',
                              created_by = '$created_by',
                              created_date = '$created_date'";
                                  $rs = mysqli_query($koneksi, $sql);
@dadihkung
Copy link
Author

so this is the view of the code just shows the 2nd last data on the file

Screenshot (376)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant