src/QueryBuilder.php
protected function _appendQuery(array $vals = NULL, string $sql, int $totalTime)
	{
		$evals = \is_array($vals) ? $vals : [];
		$esql = str_replace('?', "%s", $sql);

		// Quote string values
		foreach($evals as &$v)
		{
			$v = ( ! is_numeric($v))
				? htmlentities($this->driver->quote($v), ENT_NOQUOTES, 'utf-8')
				: $v;
		}

		// Add the query onto the array of values to pass
		// as arguments to sprintf
		array_unshift($evals, $esql);

		// Add the interpreted query to the list of executed queries
		$this->queries[] = [
			'time' => $totalTime,
			'sql' => sprintf(...$evals)
		];

		$this->queries['total_time'] += $totalTime;

		// Set the last query to get rowcounts properly
		$this->driver->setLastQuery($sql);
	}
protected function _appendQuery(array $vals = NULL, string $sql, int $totalTime)
	{
		$evals = \is_array($vals) ? $vals : [];
		$esql = str_replace('?', "%s", $sql);

		// Quote string values
		foreach($evals as &$v)
		{
			$v = ( ! is_numeric($v))
				? htmlentities($this->driver->quote($v), ENT_NOQUOTES, 'utf-8')
				: $v;
		}

		// Add the query onto the array of values to pass
		// as arguments to sprintf
		array_unshift($evals, $esql);

		// Add the interpreted query to the list of executed queries
		$this->queries[] = [
			'time' => $totalTime,
			'sql' => sprintf(...$evals)
		];

		$this->queries['total_time'] += $totalTime;

		// Set the last query to get rowcounts properly
		$this->driver->setLastQuery($sql);
	}
protected function _appendQuery ( array $ vals = NULL , string $ sql , int $ totalTime ) { $ evals = \ is_array ( $ vals ) ? $ vals : [ ] ; $ esql = str_replace ( '?' , "%s" , $ sql ) ; // Quote string values foreach ( $ evals as & $ v ) { $ v = ( ! is_numeric ( $ v ) ) ? htmlentities ( $ this -> driver -> quote ( $ v ) , ENT_NOQUOTES , 'utf-8' ) : $ v ; } // Add the query onto the array of values to pass // as arguments to sprintf array_unshift ( $ evals , $ esql ) ; // Add the interpreted query to the list of executed queries $ this -> queries [ ] = [ 'time' => $ totalTime , 'sql' => sprintf ( ... $ evals ) ] ; $ this -> queries [ 'total_time' ] += $ totalTime ; // Set the last query to get rowcounts properly $ this -> driver -> setLastQuery ( $ sql ) ; }
Convert the prepared statement into readable sql

@param array $vals
@param string $sql
@param int $totalTime
@return void
Convert the prepared statement into readable sql