**** QUERY PHP****


Select dari 3 bual tabel :

SELECT E.nrp, E.nama, C.nama,C.sks,B.huruf
FROM mhs AS E, mk AS C, nilai AS B
WHERE E.nrp=B.nrp AND B.kode=C.kode
AND E.nrp LIKE ‘%$data_cari%’;

relasi ke PHP:

echo $jum;

if ($jum >0 )
<font size=”+2″><strong>Hasil Pencarian</strong></font><br>
<? echo “<font size=3> Data yang dicari &nbsp;&nbsp;<u><strong>”.$data_cari. “</strong></u></font>”?>

<table width=”100%” border=”1″ >
<tr bgcolor=”#bfdoea”>
<td><div align=”center”><b>NRP</b></div></td>
<td><div align=”center”><b>Nama</b></div></td>
<td><div align=”center”><b>Nama MK </b></div></td>
<td><div align=”center”><b>S K S </b></div></td>
<td><div align=”center”><b>Nilai Huruf </b></div></td>
<td><div align=”center”><b>Total</b></div></td>

echo “<tr>”;
echo “<td bgcolor=ffffff>”.$row[0].”</td>”;
echo “<td bgcolor=ffffff>”.$row[1].”</td>”;
echo “<td bgcolor=ffffff>”.$row[2].”</td>”;
echo “<td bgcolor=ffffff>”.$row[3].”</td>”;
echo “<td bgcolor=ffffff>”.$row[4].”</td>”;
echo “<td bgcolor=ffffff>”

echo “</td>”;

echo “</tr>”;
echo “<br>”;
else {
echo “<center><font size=5 >Data yang di cari  &quot; <font color=red> <u>$data_cari</u> </font> </center>”;
echo “<center><font size=5> Tidak Ditemukan </font></center>”;


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s