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

[Bug] Error 500 Saat menampilkan Filter pada DPT #1995

Closed
redjoel opened this issue Apr 2, 2019 · 3 comments

Comments

@redjoel
Copy link
Contributor

@redjoel redjoel commented Apr 2, 2019

Bagaimana alurnya sampai muncul masalah?

https://demo.opensid.my.id/index.php/dpt/index/1/0

Error 500

Seperti apa yang diharapkan?

Seharusnya menampilkan DPT dari dusun terfilter

Apa yang terjadi?

Unknown column 'a2.dusun' in 'where clause'

SELECT COUNT(u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_wil_clusterdesa a ON d.id_cluster = a.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pendidikan sd ON u.pendidikan_sedang_id = sd.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_penduduk_hubungan hub ON u.kk_level = hub.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id LEFT JOIN log_penduduk log ON u.id = log.id_pend WHERE u.pekerjaan_id NOT IN ('6', '7') AND u.status_dasar = 1 AND u.status = 1 AND u.warganegara_id = 1 AND (((SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(STR_TO_DATE('02-04-2019','%d-%m-%Y'))-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= 17) OR u.status_kawin IN (2,3,4)) AND ((u.id_kk <> '0' AND a.dusun = 'LOCO') OR (u.id_kk = '0' AND a2.dusun = 'LOCO'))

Filename: models/Dpt_model.php

Line Number: 108

Informasi tambahan

Tanya Jawab
Versi OpenSID 19.04
Versi PHP
System operasi
@eddieridwan eddieridwan changed the title Error 500 Saat menampilkan Filter pada DPT [Bug] Error 500 Saat menampilkan Filter pada DPT Apr 2, 2019
@eddieridwan eddieridwan added the bug label Apr 2, 2019
@eddieridwan eddieridwan added this to SUDAH DI MASTER in Rilis yang sedang dikerjakan Apr 2, 2019
@eddieridwan

This comment has been minimized.

Copy link
Collaborator

@eddieridwan eddieridwan commented Apr 3, 2019

Sudah dicommit ke master.

@eddieridwan eddieridwan closed this Apr 3, 2019
@redjoel

This comment has been minimized.

Copy link
Contributor Author

@redjoel redjoel commented Apr 3, 2019

Terima kasih pak...

@lynggo

This comment has been minimized.

Copy link

@lynggo lynggo commented May 19, 2019

Pertama Cek dulu Sql
$ mysql -u root -p -e "SHOW VARIABLES LIKE 'sql_mode';"
Akan munch :
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
NO_ZERO_IN_DATE,NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO,
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Kedua Disable Strict Mode via SQL
$ mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"

Terakhir verifikasi :
mysql -u root -p -e "SELECT @@GLOBAL.sql_mode;"

Done..

saya kemaren gitu juga saat abis upgrade ke 19.05, pas mau upload berita dan tambah galeri error 500 pada file Web_gallery_model.php

tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.