Minggu, 08 September 2013

PHP Indonesia - Facebook: misi master mau tanya.. lagi main pagination di C...

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/ 
Refresh your vocabulary.

Learn a new word everyday by subscribing to Word of the Day. A great tool if you're studying for the GRE, GMAT or LSAT, or simply want to enhance your lexicon.
From our sponsors
misi master mau tanya.. lagi main pagination di C...
Sep 8th 2013, 14:18, by Indra Dwi Nugroho

Indra Dwi Nugroho 2:18pm Sep 8
misi master mau tanya..
lagi main pagination di CI ni..

kok ketika saya klik 2 atau tanda ">" keluar notif page not found ya ..

url benar "../c_dbteman/page/2"

mohon bantuan master

Alexandra Namo Nugraheni 2:22pm Sep 8
apa ga sebaiknya drimu pastekan juga code nya dsni??
atw d pastebin
biar yg mau jwb jga lbh enak?

Indra Dwi Nugroho 2:26pm Sep 8
sip ini diriku paste codenya

view ny

<?php
echo heading($judulapp, 3);
echo "<table style='margin:auto;width:80%'>";

$c = 1;
foreach($tampil -> result() as $row)
{
echo "<tr><td>No : " .$row -> no ."<br />";
echo "<tr><td>Nama Teman : " .$row -> namateman ."<br />";
echo "<tr><td>No Telpon : " .$row -> notelp ."<br />";
echo "<tr><td>Email : " .$row -> email ."<hr /></td></tr>";
}

echo "</table>";
echo $pagination;
?>

Indra Dwi Nugroho 2:26pm Sep 8
controllernya

function page($p = 0)
{
$this -> load -> model("m_dbci");

$jppage = 2;

$config['base_url'] = site_url().'/c_dbteman/page/';
$config['total_rows'] = $this -> m_dbci -> getjrecord();
$config['per_page'] = $jppage;
$this -> pagination -> initialize($config);

$data["pagination"] = $this -> pagination -> create_links();
$data["tampil"] = $this -> m_dbci -> gettamanpage($p, $jppage);
$data["judulapp"] = "Baca tabel dengan paging";

$this -> load -> view("v_c_tampil_page", $data);
}

}

Indra Dwi Nugroho 2:26pm Sep 8
modelnya

function getjrecord()
{
$jrec = $this -> db -> count_all("teman");
return $jrec;
}

Andri Selalu Sayang Neng 2:32pm Sep 8
coba config nya ditambah

$ config['total_rows'] =isinya total semuadata;
$ config['uri_segment'] = $this->uri->segment(3);
$ config['num_links'] = 2;

Indra Dwi Nugroho 2:37pm Sep 8
oh iya maap gan ada yang lupa

model lanjutan

function gettamanpage($p = 0, $jppage = 1)
{
$sqlstr = "select * from teman";
$sqlstr .= " limit $p, $jppage ";
$hslquery = $this -> db -> query($sqlstr);
return $hslquery;
}

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