Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Data_anggota_new {
- private $mysqli;
- function __construct($conn)
- {
- $this->mysqli = $conn;
- }
- public function tampil($id = null)
- {
- $db = $this->mysqli->conn;
- $sql = "SELECT * FROM tb_jurusan";
- if ($id != null)
- {
- $sql .= " WHERE id_jurusan = $id";
- }
- $query = $db->query($sql) or die ($db->error);
- return $query;
- }
- function __destruct()
- {
- $db = $this->mysqli->conn;
- $db->close();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement