public function query($sql)
    {
        // auto reconnect
        $this->connect();
        
        //echo $sql;
        $this->statement = null; //reset 
        //echo 'adapter:'; var_dump($sql);exit;
        if (!($this->result = $this->connection->query($sql))) {
            $this->showError();
        }
        return $this->result;
    }
public function query($sql)
    {
        // auto reconnect
        $this->connect();
        
        //echo $sql;
        $this->statement = null; //reset 
        //echo 'adapter:'; var_dump($sql);exit;
        if (!($this->result = $this->connection->query($sql))) {
            $this->showError();
        }
        return $this->result;
    }
public function query ( $ sql ) { // auto reconnect $ this -> connect ( ) ; //echo $sql; $ this -> statement = null ; //reset  //echo 'adapter:'; var_dump($sql);exit; if ( ! ( $ this -> result = $ this -> connection -> query ( $ sql ) ) ) { $ this -> showError ( ) ; } return $ this -> result ; }
Execute the SQL query and create a result resource, or display the SQL error.

@param  string $sql
@return mixed  \mysqli_result|boolean
Execute the SQL query and create a result resource or display the SQL error .