private function bind_params( $query, $bindings, $update = false )
	{

		$query    = str_replace( '"', '`', $query );
		$bindings = $this->prepareBindings( $bindings );

		if ( ! $bindings ) {
			return $query;
		}

		$bindings = array_map( function ( $replace )
		{
			if ( is_string( $replace ) ) {
				$replace = "'" . esc_sql( $replace ) . "'";
			} elseif ( $replace === null ) {
				$replace = "null";
			}

			return $replace;
		}, $bindings );

		$query = str_replace( [ '%', '?' ], [ '%%', '%s' ], $query );
		$query = vsprintf( $query, $bindings );

		return $query;
	}