Selasa, 29 Oktober 2013

PHP Indonesia - Facebook: [Tanya | Display Data] Saya punya script seperti ...

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/ 
Start taking a college level music theory class today.

This beginner class is now accessible to aspiring musicians of all ages. Learn all of the basic concepts in an easy to follow manner.
From our sponsors
[Tanya | Display Data] Saya punya script seperti ...
Oct 30th 2013, 04:17, by Idle Track

Idle Track 4:17am Oct 30
[Tanya | Display Data]

Saya punya script seperti di bawah ini :

$connect = mysqli_connect($hostname, $username, $password, $database);
$query="CALL st_cetak_angsuran('011307084248')";
$data = mysqli_query($connect, $query);

//Load Data Untuk Header
$hasil = mysqli_fetch_array($data);
echo $hasil['nama']."<br />";

//Load Data Untuk Detail
while($jhasil = mysqli_fetch_array($data)){
echo $jhasil['bayar'];
$jtotal += $jhasil['bayar'];
echo "<tr>
<td> &nbsp; </td>
<td>".$jhasil['ket']."</td>
<td>:</td>
<td>".format_rupiah($jhasil['bayar'])."</td>
</tr>";
}

Pertanyaan :
1. Kenapa Load data untuk Detailnya tidak muncul yah, apakah ada kesalahan dalam scriptnya atau salah dalam struktur penulisannya ??
2. Solusinya bagaimana ??

Cahya Dsn 4:26am Oct 30
store procedure-nya (st_cetak_angsuran()) isinya gimana? yg dikembalikan berupa skalar/records atau apa?

Idle Track 4:28am Oct 30
Berupa record om

Idle Track 4:31am Oct 30
Ini mas kalau saya running di IDE Navicat

Cahya Dsn 4:37am Oct 30
[1] karena yang diperoleh 'cuman' 1 record maka, saat di fetch pertama kali masih bisa diambil nilai2-nya
[2] tapi saat di fetch lagi, karena cuman ada satu record dan sudah di fetch sebelumnya, maka nggak bisa diambil lagi
[3] saat fetching pertama, masukkan ke dalam variabel array, baru diambil/ditampilkan hasilnya dari array tersebut

cmiiw ^_^V

Idle Track 4:40am Oct 30
Cahya Dsn : Saya baru inget mas, soalnya kemaren muncul karena ada 3 record, jadi itu yah penjelasannya,

Oke mas, saya coba tampung ke variabel array

Makasih mas Cahya (Y)

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