Kamis, 31 Oktober 2013

PHP Indonesia - Facebook: mau tanya kalau buat looping sql yang kita tentuin...

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/ 
Join Delanceyplace

Sign up to receive a free quote from a non fiction book every weekday.
From our sponsors
mau tanya kalau buat looping sql yang kita tentuin...
Oct 31st 2013, 14:56, by Eko Agustiawan

Eko Agustiawan 2:56pm Oct 31
mau tanya kalau buat looping sql yang kita tentuin gimana ya, misalnya cuman mau nampilin 10 pesan / looping.
contoh script :
--------------------
while($data = mysql_fetch_array($result))
{
echo "<b>".$data['nama']."</b> : ".$data['pesan']."</td><br>";
}
}

-------------------
baru belajar sql , biasanya pake db flat.

makasih sebelumnya

Ardha Herdianto 3:00pm Oct 31
#nyimak

Biasanya ane kalo nampilin beberapa main di sql query nya, pake LIMIT

Happy Coding 3:06pm Oct 31
pakek limit sja mas Eko Agustiawan

Anton Wahyu Pramono 3:07pm Oct 31
if ($i==10) break;

Kholid Aljohani 3:08pm Oct 31
$query = "SELECT* FROM buku_tamu WHERE kode_page = $kode_page ORDER BY id LIMIT $offset, $dataPerPage"; $result = mysql_query($query) or die('Error');

Asep Aziz 3:15pm Oct 31
diujung query'nya ditambahin LIMIT x,y
dimana x adalah nomor record pertama yg akan ditampilkan, dan y adalah jumlah record yg akan ditampilkan.
ex: limit 0,10 => record yg akan ditampilkan sebanyak 10 record, dimulai dari record ke-0

Ferdi Ferdian 4:31pm Oct 31
bisa pake limit atau breaks setelah 10 kali looping tapi disaranin pake limit

Izey Linuxer 4:32pm Oct 31
limit 10

Rudye 4:44pm Oct 31
limit ohm

Zakky 4:51pm Oct 31
$i = 0;
while($data = mysql_fetch_array($result))
{
echo "<b>".$data['nama']."</b> : ".$data['pesan']."</td><br>";
if($i == 10) {
break;
}
$i++;
}

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