Executes given SQL statement.
@param string $queryString
@return mysqli_result|bool
@throws DriverException
1411
public function runQuery($queryString){

		$this->affectedRows = false;
		$result = $this->resource->query($queryString, $this->unbuffered ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT);

		$error = preg_replace('~You have an error in your SQL syntax; check the manual that corresponds to your \w+ server version for the right syntax to use~i', 'Syntax error', $this->resource->error);
		if($error && $result === false)
			throw new DriverException($error, $this->resource->errno, $queryString);

		$this->affectedRows = $this->resource->affected_rows;
		return $result;
	}
1266440
public function execute(array $inputParameters = null): bool
    {
        if(null !== $inputParameters)
        {
            foreach($inputParameters as $k => $v)
            {
                if(is_numeric($k))
                {
                    $this->statement->bindValue($k + 1, $v, $this->getDataTypeByValue($v));
                }
                else
                {
                    $this->statement->bindValue($k, $v, $this->getDataTypeByValue($v));
                }
            }
        }
        $result = $this->statement->execute();
        if(!$result)
        {
            throw new DbException('sql query error: [' . $this->errorCode() . '] ' . $this->errorInfo() . ' sql: ' . $this->getSql());
        }
        return $result;
    }
278771
public function execute($config = null)
    {

        if(null == $config){
            $pdo = Config::getDefault()->getPdo();
        }else if($config instanceof \PDO){
            $pdo = $config;
        }else if($config instanceof Config){
            $pdo = $config->getPdo();
        }else{
            throw new BadParameterException('First parameter of FQuery::execute is not correct');
        }

        $stmt = $this->getPdoStatement($pdo);

        if ($stmt->execute()) {
            return $stmt;

        } else {
            // TODO : handle errors ".__FILE__.":".__LINE__;
            throw new QueryFailedException($stmt);
            //return false;
        }

    }
811182
public function execute($data = null)
    {
        if (!isset($data->db) || !$data->db instanceof AbstractDatabaseDriver) {
            return $this->next->execute($data);
        }

        if ($data->debug) {
            $this->logger->log(LogLevel::DEBUG, 'Executed: {sql}', ['sql' => $data->sql]);
        }

        try {
            $result = $this->next->execute($data);
        } catch (\RuntimeException $e) {
            // Throw the normal query exception.
            $this->logger->log(
                LogLevel::ERROR,
                'Database query failed (error #{code}): {message}',
                ['code' => $e->getCode(), 'message' => $e->getMessage()]
            );

            throw new $e();
        }

        return $result;
    }
292966
public function runQuery($queryString){
		$this->affectedRows = false;

		$result = @pg_query($this->resource, $queryString);
		if($result === false)
			throw new DriverException(pg_last_error($this->resource), null, $queryString);

		$this->affectedRows = @pg_affected_rows($result);
		return $result;
	}
737509
public function execute($string)
    {
        $string = strtolower((string) $string);
        if (!preg_match(self::PATTERN, $string)) {
            return null;
        }

        if ($string{0} === 't' || $string{0} === '1') {
            return true;
        } else {
            return false;
        }
    }
1067661
private function _parseQueryString($queryString)
    {
        $queryObjs = json_decode($queryString);
        if (!$queryObjs) {
            throw new SqlException(
                'There was an error parsing your filter query string. '
                . 'The filter query must be in the format of a JSON object.'
            );
        }

        //inject a single object into an array.
        if (!is_array($queryObjs)) {
            $queryObj = $queryObjs;
            $queryObjs = [];
            $queryObjs[] = $queryObj;
        }

        $firstObj = true;
        foreach ($queryObjs as $queryObj) {
            $firstProperty = true;
            foreach ($queryObj as $property => $value) {
                if (is_array($value)) {
                    foreach ($value as $val) {
                        $this->_addFilterComparison($firstObj, $firstProperty, $property, $val);
                    }
                } else {
                    $this->_addFilterComparison($firstObj, $firstProperty, $property, $value);
                }
                $firstProperty = false;
            }
            $firstObj = false;
        }
    }
595053
protected function fromString($queryString)
    {
        if (empty($queryString)) {
            return $this;
        }

        $data = array();

        parse_str($queryString, $data);

        $this->fromArray($data);

        return $this;
    }
1072398
public function query($queryString, array $queryValues = [])
    {
        if (!is_string($queryString) || empty($queryString)) {
            throw new \InvalidArgumentException(
                __METHOD__.': The specified query is not valid.'
            );
        }

        $this->connect();
        $this->resourceHandle = $this->dbConnection->prepare($queryString);

        try {
            // start transaction
            $this->dbConnection->beginTransaction();

            // execute the query and return a status
            $this->executionStatus = $this->resourceHandle->execute($queryValues ?: null);

            // get last inserted id if present
            $this->lastInsertedId = $this->dbConnection->lastInsertId();

            // finally execute the query
            $this->dbConnection->commit();
        } catch (\PDOException $ex) {
            // If an error occurs, execute rollback
            $this->dbConnection->rollBack();

            // Return execution status to false
            $this->executionStatus = false;
            $this->resourceHandle->closeCursor();

            throw new \RuntimeException(
                __METHOD__.": {$ex->getMessage()}\nqueryString: {$queryString}"
            );
        }

        return $this->resourceHandle;
    }
534479
public function execute($params = null) {
		if ($params === null) {
			$params = [];
		}

		try {
			$this->stmt->execute($params);

			return new QueryResult($this->stmt, $this->pdo);
		} catch (PDOException $e) {
			throw $this->exAdapter->adapt($e, $this->stmt, $params);
		}
	}
986565
public function execute()
	{
		$pdoStatement = $this->pdo->prepare((string) $this);

		foreach ($this->bindings as $clause => $predicate) {
			foreach ($predicate as $key => $value) {
				$pdoStatement->bindValue(sprintf(':%s%d', $clause, $key + 1), $value, $this->getPdoDataType($value));
			}
		}

		$pdoStatement->execute();

		return new QueryResult($pdoStatement);
	}
871291
protected function buildUserSearchQuery($searchString = null)
    {
        $builder = $this->createQueryBuilder('u');

        if (!empty($searchString)) {
            $builder
                ->where($builder->expr()->like('u.email', ':searchString'))
                ->orWhere($builder->expr()->like('u.displayName', ':searchString'))
                ->setParameter('searchString', '%' .$searchString . '%');
        }

        return $builder;
    }
1129620
public function query(string $sql, array $params = []): Statement
    {
        if (!$stmt = sqlsrv_query($this->connection, $sql, $params)) {
            throw new SqlException('Query failed', sqlsrv_errors(), $sql, $params);
        }

        $statement = new Statement($stmt, false, $sql, $params);
        $statement->execute();
        return $statement;
    }
307483
public function execute_query($query_string)
    {
        $this->last_query = $query_string;
        
        if (!$this->connection) {
            $this->last_error_id = "db_server_conn_error";
            return false;
        }
        
        $options = [];
        
        /*
        If the cursor is SQLSRV_CURSOR_STATIC or other than
        SQLSRV_CURSOR_FORWARD, retreiving of the data
        has sometimes very poor performance. Not the query execution,
        but the data retrieving!
    
        The default is SQLSRV_CURSOR_FORWARD, but it is not possible
        to get fetched_count by this type of cursor. So we sacrifice
        the possibility to get fetched_count for the preformance.
        The preformance is more important.
    
        no more relevant in new version of driver
        */
        
        if (preg_match("/\s*SELECT/i", $query_string)) {
            $options = ["Scrollable" => SQLSRV_CURSOR_STATIC];
        }
        
        $this->statement = @sqlsrv_query($this->connection, $query_string, [], $options);
        if (!$this->statement) {
            $this->last_error = $this->sys_get_errors();
            $this->last_error_id = "db_query_error";
            
            trigger_error($this->last_error . "\n\n" . $this->last_query, E_USER_ERROR);
            return false;
        }
        
        return true;
    }
589397
public function execute($query) {
		$query = $query->compile();
		return $this->driver->query($query->sql(), $query->params());
	}
1291608
private function query($queryString = null)
    {
        $query = ($queryString == null) ? $this->query : $queryString;

        $this->statement = $this->_connection->prepare($query);
        $this->statement->execute();

        return $this;
    }
725835
public function runQuery($queryString){

		$this->affectedRows = false;
		if($this->dbCharset !== null)
			$queryString = iconv($this->charset, $this->dbCharset . '//IGNORE', $queryString);

		if($this->unbuffered)
			$result = @sqlite_unbuffered_query($this->resource, $queryString, null, $error);
		else
			$result = @sqlite_query($this->resource, $queryString, null, $error);

		if($error && $result === false)
			throw new DriverException($error, sqlite_last_error($this->resource), $queryString);

		$this->affectedRows = @sqlite_changes($this->resource);
		return $result;
	}