MysqliDb::_prepareQuery PHP Method

_prepareQuery() protected method

Method attempts to prepare the SQL query and throws an error if there was a problem.
protected _prepareQuery ( ) : mysqli_stmt
return mysqli_stmt
    protected function _prepareQuery()
    {
        if (!($stmt = $this->mysqli()->prepare($this->_query))) {
            $msg = $this->mysqli()->error . " query: " . $this->_query;
            $num = $this->mysqli()->errno;
            $this->reset();
            throw new Exception($msg, $num);
        }
        if ($this->traceEnabled) {
            $this->traceStartQ = microtime(true);
        }
        return $stmt;
    }