Log in

View Full Version : Nanya ttg CodeIgniter Gan


Guesuper
20th November 2011, 10:48 AM
gan gw maw nanya, :ganteng:



ceritanya ane maw outputin variable yang digenerate oleh code ane yg ditulis ke sebuah table....



code di CI:




Code:

public function viewdata() {
$this->load->helper('url');
$this->load->library('table');
$this->load->view('viewdata');
$this->load->database();
$storedq = "SELECT * FROM park_lot";
$query = $this->db->query($storedq);
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{

}
}

}

nah sekarang ane maw nampilin result dari query di atas di dalam html nya gan:




Code:


Slot IDPlat Nomer



masalahnya , php ane error, katanye variable $row blom dideklarasi... gimana yah gan solusinya? thx :ganteng:

</div>