Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Table {
- private $db;
- public function __constructor()
- {
- $this->db = new mysqli();
- }
- public function getRowsFromDb($id=0)
- {
- $res = $this->db->query("SELECT * FROM sdfsdf");
- $arr = array();
- if ($res->num_rows > 0) {
- while($row = $res->fetch_assoc()) {
- $arr[] = $row;
- }
- }
- return $arr;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement