Rabu, 18 September 2013

PHP Indonesia - Facebook: [help] Gan ini kenapa ya kok begini?

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/ 
Want free Kindle ebooks?

Sign up to receive the best freebie Kindle ebook deals in your email every day.
From our sponsors
[help] Gan ini kenapa ya kok begini?
Sep 18th 2013, 11:03, by Risman Herdiana

Risman Herdiana 11:03am Sep 18
[help]
Gan ini kenapa ya kok begini?

Risman Herdiana 11:03am Sep 18
Syntak nya -->

<?php
include "koneksi.php";
?>
<div id="content">
<h2>Data Buku</h2>
<table id="tabel">
<tr>
<th width="5%">No</td>
<th width="10%">Kode Buku</td>
<th width="12%">Kode Kategori</td>
<th width="12%">Kode Penerbit</td>
<th width="12%">Judul Buku</td>
<th width="10%">Jumlah Buku</td>
<th width="12%">Pengarang</td>
<th width="12%">Deskripsi</td>
<th width="11%">Tahun Terbit</td>
<th>Action</td>
</tr>
<?
$no = 1;
$query = "SELECT buku_kode, kategori_kode, penerbit_kode, buku_judul, buku_jumlah, buku_diskripsi, buku_pengarang, buku_tahun_terbit,'
FROM pegawai ORDER BY buku_kode";
$sql = mysql_query ($query);
while ($hasil = mysql_fetch_array($sql)) {
$kode = $hasil['buku_kode'];
$kategori = ($hasil['kategori_kode']);
$penerbit = ($hasil['penerbit_kode']);
$judul = ($hasil['buku_judul']);
$jumlah = ($hasil['buku_jumlah']);
$diskripsi = ($hasil['buku_diskripsi']);
$pengarang = ($hasil['buku_pengarang']);
$thn_terbit = ($hasil['buku_tahun_terbit']);
$warna = ($no%2==1)?"#ffffff":"#efefef";
//
//tampilkan data
?>
<tr bgcolor="<?=$warna?>">
<td><?=$no?></td>
<td><?=$buku_kode?></td>
<td><?=$kategori_kode?></td>
<td><?=$penerbit_kode?></td>
<td><?=$buku_judul?></td>
<td><?=$buku_jumlah?></td>
<td><?=$buku_diskripsi?></td>
<td><?=$buku_pengarang?></td>
<td><?=$buku_tahun_terbit?></td>
<td>
<a href="index.php?page=edit&nip=<?=$nip?>">Edit</a><br/>
<a href="index.php?page=delete&nip=<?=$nip?>">Delete</a></td>
</tr>
<? $no++; }?>
</table>
</div>

Ardi Ansyah 11:05am Sep 18
SELECT buku_kode, kategori_kode, penerbit_kode, buku_judul, buku_jumlah, buku_diskripsi, buku_pengarang, buku_tahun_terbit,'
FROM pegawai ORDER BY buku_kode

Ardi Ansyah 11:06am Sep 18
salah setelah buku_tahun_terbit hilangkan ,'

Risman Herdiana 11:17am Sep 18
Bang #Ardi maksudnya gmna ya, saya kurang paham

Ardi Ansyah 11:18am Sep 18
coba ganti scriptnya sama yg ini

Ardi Ansyah 11:18am Sep 18
<?php
include "koneksi.php";
?>

<div id="content">
<h2>Data Buku</h2>
<table id="tabel">
<tr>
<th width="5%">No</td>
<th width="10%">Kode Buku</td>
<th width="12%">Kode Kategori</td>
<th width="12%">Kode Penerbit</td>
<th width="12%">Judul Buku</td>
<th width="10%">Jumlah Buku</td>
<th width="12%">Pengarang</td>
<th width="12%">Deskripsi</td>
<th width="11%">Tahun Terbit</td>
<th>Action</td>
</tr>
<?
$no = 1;
$query = "SELECT buku_kode, kategori_kode, penerbit_kode, buku_judul, buku_jumlah, buku_diskripsi, buku_pengarang, buku_tahun_terbit
FROM pegawai ORDER BY buku_kode";
$sql = mysql_query ($query);
while ($hasil = mysql_fetch_array($sql)) {
$kode = $hasil['buku_kode'];
$kategori = ($hasil['kategori_kode']);
$penerbit = ($hasil['penerbit_kode']);
$judul = ($hasil['buku_judul']);
$jumlah = ($hasil['buku_jumlah']);
$diskripsi = ($hasil['buku_diskripsi']);
$pengarang = ($hasil['buku_pengarang']);
$thn_terbit = ($hasil['buku_tahun_terbit']);
$warna = ($no%2==1)?"#ffffff":"#efefef";
//
//tampilkan data
?>
<tr bgcolor="<?=$warna?>">
<td><?=$no?></td>
<td><?=$buku_kode?></td>
<td><?=$kategori_kode?></td>
<td><?=$penerbit_kode?></td>
<td><?=$buku_judul?></td>
<td><?=$buku_jumlah?></td>
<td><?=$buku_diskripsi?></td>
<td><?=$buku_pengarang?></td>
<td><?=$buku_tahun_terbit?></td>
<td>
<a href="index.php?page=edit&nip=<?=$nip?>">Edit</a><br/>
<a href="index.php?page=delete&nip=<?=$nip?>">Delete</a></td>
</tr>
<? $no++; }?>
</table>
</div>

Rizki Otoy Alfredo Himura 11:22am Sep 18
<?php
include "koneksi.php";
?>

<div id="content">
<h2>Data Buku</h2>
<table id="tabel">
<tr>
<th width="5%">No</td>
<th width="10%">Kode Buku</td>
<th width="12%">Kode Kategori</td>
<th width="12%">Kode Penerbit</td>
<th width="12%">Judul Buku</td>
<th width="10%">Jumlah Buku</td>
<th width="12%">Pengarang</td>
<th width="12%">Deskripsi</td>
<th width="11%">Tahun Terbit</td>
<th>Action</td>
</tr>
<?
$no = 1;
$query = "SELECT buku_kode, kategori_kode, penerbit_kode, buku_judul, buku_jumlah, buku_diskripsi, buku_pengarang, buku_tahun_terbit
FROM pegawai ORDER BY buku_kode";
$sql = mysql_query ($query);
if(mysql_num_rows($sql) >0){
while ($hasil = mysql_fetch_array($sql)) {
$kode = $hasil['buku_kode'];
$kategori = ($hasil['kategori_kode']);
$penerbit = ($hasil['penerbit_kode']);
$judul = ($hasil['buku_judul']);
$jumlah = ($hasil['buku_jumlah']);
$diskripsi = ($hasil['buku_diskripsi']);
$pengarang = ($hasil['buku_pengarang']);
$thn_terbit = ($hasil['buku_tahun_terbit']);
$warna = ($no%2==1)?"#ffffff":"#efefef";
//
//tampilkan data
?>
<tr bgcolor="<?=$warna?>">
<td><?=$no?></td>
<td><?=$buku_kode?></td>
<td><?=$kategori_kode?></td>
<td><?=$penerbit_kode?></td>
<td><?=$buku_judul?></td>
<td><?=$buku_jumlah?></td>
<td><?=$buku_diskripsi?></td>
<td><?=$buku_pengarang?></td>
<td><?=$buku_tahun_terbit?></td>
<td>
<a href="index.php?page=edit&nip=<?=$nip?>">Edit</a><br/>
<a href="index.php?page=delete&nip=<?=$nip?>">Delete</a></td>
</tr>
<? $no++; }}?>
</table>
</div>

di coba dah gan

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