alexa-tracking

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/53203ed0a1cb1714568b46df/bantu-dong-gan--sql
Bantu dong gan . SQL
Ceritanya ane mau ngegabungin 2 tabel. Tabel biodata sama tabel status pegawai. Nih gan tabelnya
Tabel ini
Bantu dong gan . SQL
sama tabel ini
Bantu dong gan . SQL

Nah script ane yang gagal gan =>

Quote:select count(*) FROM (select COUNT(biodata.Nomor_Induk) as jumData from biodata LEFT JOIN statuspegawai ON biodata.Nomor_Induk = statuspegawai.Nomor_Induk where statuspegawai.divisi='IT' Group By biodata.Nomor_Induk[/QUOTE

Bacaan errornya ->
[QUOTE]Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\res\Administrator\IT.php on line 66

script ->
Quote: $query = "select count(*) FROM (SELECT COUNT(biodata.Nomor_Induk) as jumData from biodata INNER JOIN statuspegawai ON biodata.Nomor_Induk = statuspegawai.Nomor_Induk where statuspegawai.bagian='IT' Group By biodata.Nomor_Induk)";
$hsl = mysql_query($query);
$data = mysql_fetch_array($hsl);

$jumData = $data['jumData'];
$jumPage = ceil($jumData/$dataPerPage);
Solved !

Ane ubah script jadi kaya gini

Quote: $query = "select COUNT(distinct biodata.Nomor_Induk) as jumData from biodata INNER JOIN statuspegawai ON biodata.Nomor_Induk=statuspegawai.Nomor_Induk where statuspegawai.bagian = 'IT';";
$hsl = mysql_query($query);
$data = mysql_fetch_array($hsl);
Quote:Original Posted By bossby
Solved !

Ane ubah script jadi kaya gini



sip gan,, di tunggu cendolnya... Huahahahahahhahaaha...
Quote:Original Posted By indrameong03


sip gan,, di tunggu cendolnya... Huahahahahahhahaaha...


Agan sehat ? emoticon-No Hope