-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWelcome.php
More file actions
35 lines (30 loc) · 847 Bytes
/
Copy pathWelcome.php
File metadata and controls
35 lines (30 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index(){
$data = $this->mymodel->GetBarang();
$this->load->view('daftar-barang',array('data' => $data));
}
public function insert(){
echo "tes";
}
public function update(){
}
public function delete(){
}
public function panggil(){
$data = $this->db->query("SELECT * FROM barang");
/*echo "<pre>";
print_r($data);
echo "</pre>";*/
echo "Jumlah data = ".$data->num_rows()."<hr />";
foreach ($data->result() as $row){
echo "ID Barang : ".$row->ID_Barang."<br />";
echo "Nama Barang: ".$row->Nmbarangr."<br />";
echo "Jenis Barang: ".$row->Jnbarang."<br />";
echo "Harga Barang : ".$row->Hgbarang."<br />";
echo "Stok Barang : ".$row->Stbarang."<br />";
echo "<hr />";
}
}
}