function __construct($id) { $db = new DatabaseConnection("localhost", "adminuser", "asd12345", "school"); $sql = "SELECT * FROM teachers WHERE id = ?"; $string = array($id); $res = $db->select($sql, $string, true, 'i'); $n = $res[0]['name']; $c = $res[0]['code']; $b = $res[0]['birth']; $r = $res[0]['residency']; $p = $res[0]['password']; $e = $res[0]['email']; $pn = $res[0]['p_num']; parent::__construct($id, $c, $n, $b, $p, $e, $pn, $r); }
public function __construct() { parent::__construct(); }