db, $s); if (mysqli_num_rows($q) > 0){ $r = mysqli_fetch_array($q); $this->code = $r["code"]; $this->name = $r["name"]; $this->active = $r["active"]; } } } ?>