Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Jquery Nestable List
- * @author Vicky Nitinegoro
- * @see http://vicky-nitinegoro.blogspot.co.id/2016/12/membuat-menggunakan-jquery-nestable.html
- **/
- class Menu
- {
- public $connection;
- /* Pengaturan Database */
- // host name
- private $hostname = 'localhost';
- // password
- private $user = 'root';
- // password
- private $password = '';
- // database name
- private $database = 'test';
- public function __construct()
- {
- $this->connection = mysqli_connect($this->hostname, $this->user, $this->password, $this->database);
- return $this->connection;
- }
- public function getMenu()
- {
- $query = mysqli_query($this->connection, "SELECT * FROM tabel_menu WHERE menu_parent IN('0')");
- return $query;
- }
- }
Add Comment
Please, Sign In to add comment