public function runGen($returnArray = true)
	{
		$sql = $this->sqlGen();
		/** @var \mysqli_stmt $stmt */
		$stmt = $this->prepare($sql);
		if ($stmt===null) {
			return false;
		}
		$parType = implode('', $this->whereParamType);
		$values = array_values($this->whereParamValue);
		if ($parType) {
			$reval = $stmt->bind_param($parType, ...$values);
			if (!$reval) {
				$this->throwError("Error in bind","","type: ".json_encode($parType)." values:".json_encode($values));
				return false;
			}
		}
		$this->runQuery($stmt);
		$rows = $stmt->get_result();
		if ($this->genSqlFields) {
			$this->lastSqlFields=$this->obtainSqlFields($rows);
		}
		$stmt->close();
		$this->builderReset();
		if ($returnArray) {
			$r = $rows->fetch_all(MYSQLI_ASSOC);
			$rows->free_result();
			return $r;
		} else {
			return $rows;
		}
	}
public function runGen($returnArray = true)
	{
		$sql = $this->sqlGen();
		/** @var \mysqli_stmt $stmt */
		$stmt = $this->prepare($sql);
		if ($stmt===null) {
			return false;
		}
		$parType = implode('', $this->whereParamType);
		$values = array_values($this->whereParamValue);
		if ($parType) {
			$reval = $stmt->bind_param($parType, ...$values);
			if (!$reval) {
				$this->throwError("Error in bind","","type: ".json_encode($parType)." values:".json_encode($values));
				return false;
			}
		}
		$this->runQuery($stmt);
		$rows = $stmt->get_result();
		if ($this->genSqlFields) {
			$this->lastSqlFields=$this->obtainSqlFields($rows);
		}
		$stmt->close();
		$this->builderReset();
		if ($returnArray) {
			$r = $rows->fetch_all(MYSQLI_ASSOC);
			$rows->free_result();
			return $r;
		} else {
			return $rows;
		}
	}
public function runGen ( $ returnArray = true ) { $ sql = $ this -> sqlGen ( ) ; /** @var \mysqli_stmt $stmt */ $ stmt = $ this -> prepare ( $ sql ) ; if ( $ stmt === null ) { return false ; } $ parType = implode ( '' , $ this -> whereParamType ) ; $ values = array_values ( $ this -> whereParamValue ) ; if ( $ parType ) { $ reval = $ stmt -> bind_param ( $ parType , ... $ values ) ; if ( ! $ reval ) { $ this -> throwError ( "Error in bind" , "" , "type: " . json_encode ( $ parType ) . " values:" . json_encode ( $ values ) ) ; return false ; } } $ this -> runQuery ( $ stmt ) ; $ rows = $ stmt -> get_result ( ) ; if ( $ this -> genSqlFields ) { $ this -> lastSqlFields = $ this -> obtainSqlFields ( $ rows ) ; } $ stmt -> close ( ) ; $ this -> builderReset ( ) ; if ( $ returnArray ) { $ r = $ rows -> fetch_all ( MYSQLI_ASSOC ) ; $ rows -> free_result ( ) ; return $ r ; } else { return $ rows ; } }
Run builder query and returns a mysqli_result.
@param bool $returnArray true=return an array. False return a mysqli_result
@return bool|\mysqli_result
@throws Exception
Run builder query and returns a mysqli_result .