system/Database/MySQLi/PreparedQuery.php
public function _prepare(string $sql, array $options = [])
	{
		// Mysqli driver doesn't like statements
		// with terminating semicolons.
		$sql = rtrim($sql, ';');

		if (! $this->statement = $this->db->mysqli->prepare($sql))
		{
			$this->errorCode   = $this->db->mysqli->errno;
			$this->errorString = $this->db->mysqli->error;
		}

		return $this;
	}
public function _prepare(string $sql, array $options = [])
	{
		// Mysqli driver doesn't like statements
		// with terminating semicolons.
		$sql = rtrim($sql, ';');

		if (! $this->statement = $this->db->mysqli->prepare($sql))
		{
			$this->errorCode   = $this->db->mysqli->errno;
			$this->errorString = $this->db->mysqli->error;
		}

		return $this;
	}
Prepares the query against the database, and saves the connection
info necessary to execute the query later.

NOTE: This version is based on SQL code. Child classes should
override this method.

@param string $sql
@param array  $options Passed to the connection's prepare statement.
Unused in the MySQLi driver.

@return mixed