All pastes #615266 Raw Edit

Mine

public php v1 · immutable
·published 2007-07-12 01:15 UTC
rendered paste body
class whatever {  private $db;  var $type;function whatever($type) {                $this->type = $type;		$this->db = new mysqli($host, $user, $pass, $dbName);		if(mysqli_connect_error()) die("ERROR: " . mysqli_connect_errno());	}}public function doQuery($someshit) {var_dump($this->db);if($this->db->query($someshit)) { echo "bologna"; return true;  }}public function someShit($shit) { if($this->doQuery($shit)) echo "ok";}----------------------------------class somethingelse extends whatever { function somethingelse() {  $this->whatever(1);} function doShit($something) {  if($this->doQuery($something)) echo "hello";  }}------------------------------------$whatever = new somethingelse();$whatever->doShit("select * from something"); // returns mysqli error "cannot fetch mysqli result"$whatever->someShit("select * from whatever"); // works finewhy?