Minggu, 04 Agustus 2013

PHP Indonesia - Facebook: [ASK]

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
[ASK] apa yg harus sy ubah dari coding?
Aug 4th 2013, 14:02, by Muh Azwar Idris

Muh Azwar Idris 2:02pm Aug 4
[ASK]
apa yg harus sy ubah dari coding?

<table id="dapkotable" border="1px" bordercolor="#000000">
<tr>
<th rowspan="2" width="145px">NIM</th>
<th rowspan="2" width="272px">Nama Mahasiswa</th>
<th colspan="15">Mata Kuliah</th>
</tr>
<tr>
<?php
include "conn.php";
$sql = "SELECT DISTINCT tbmatakuliah.namamatkul FROM tbmatakuliah, tbmahasiswa, tbnilai WHERE tbmahasiswa.kelas = '$_SESSION[kelas]' AND tbmahasiswa.angkatan = '$_SESSION[angkatan]' AND tbmatakuliah.semester = '$_SESSION[semester]'"; //ini query pertama
$hasil = mysql_query($sql); //ini perintah bwt jalankan query pertama
while($baris = mysql_fetch_array($hasil)) //ini bwt mengambil baris2 hasil query pertama
{
echo "<th>$baris[namamatkul]</th>";
}

$sql2 = "SELECT DISTINCT tbmahasiswa.nim, tbmahasiswa.namamhs FROM tbmahasiswa, tbmatakuliah, tbnilai WHERE tbmahasiswa.kelas = '$_SESSION[kelas]' AND tbmahasiswa.angkatan = '$_SESSION[angkatan]' AND tbmatakuliah.semester = '$_SESSION[semester]' AND tbmahasiswa.nim = tbnilai.n_nim AND tbmatakuliah.kodematkul = tbnilai.n_kdmk ORDER by tbmahasiswa.nim"; //ini query kedua
$hasil2 = mysql_query($sql2); //ini perintah bwt jalankan query kedua
while($baris2 = mysql_fetch_array($hasil2)) //ini bwt mengambil baris2 hasil query kedua
{
echo "<tr>
<td>$baris2[nim]</td>
<td>$baris2[namamhs]</td>";
//echo "<td>$baris2[n_huruf]</td>";

$sql3 = "SELECT tbnilai.n_huruf FROM tbmahasiswa, tbmatakuliah, tbnilai WHERE tbmahasiswa.kelas = '$_SESSION[kelas]' AND tbmahasiswa.angkatan = '$_SESSION[angkatan]' AND tbmatakuliah.semester = '$_SESSION[semester]' AND tbmahasiswa.nim = tbnilai.n_nim AND tbmatakuliah.kodematkul = tbnilai.n_kdmk ORDER by tbmahasiswa.nim"; //ini query ketiga
$hasil3 = mysql_query($sql3); //ini perintah bwt jalankan query ketiga
while($baris3 = mysql_fetch_array($hasil3)) //ini bwt mengambil baris2 hasil query ketiga
{
echo "<td>$baris3[n_huruf]</td>";
}

echo "</tr>";
}
?>
</tr>
</table>

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar