php覆盖方法并调用覆盖

I know this can be avoided with just using another method name but I was curious as to if the following was possible.

I have this class: ( of course it has some more methods but they aren't relevant to the question )

class db extends mysqli {
    public function query($sql){
        $sql = $this->parent->query($sql);

        if($this->error){
            echo "<script>popup('SQL error bro!');</script>";
        }else{
            return $sql;
        }
    }
}

What I wanna do is call the original mysqli query() method from within the query() method I created. Is it possible or I shall get started renaming?

And also I'd like to point out that this is purely for development use, I know users aren't supposed to see sql errors. Reason I want to do this is that today I needed to change a table column name from id to vid, then my whole system stopped working and I spent 30 minutes researching, I'd just like to prevent that in future.

Change

$this->parent->query($sql);

To

$sql = parent::query($sql);

Possible but might not be best practices:

parent::query($sql)

You can call the method of the superclass by calling

parent::query();

See also: http://www.php.net/manual/en/keyword.parent.php