wordpress/wp-content/plugins/sqlite-integration/pdoengine.class.php
/**
	 * Method to execute INSERT query for SQLite version 3.7.10 or lesser.
	 *
	 * It executes the INSERT query for SQLite version 3.7.10 or lesser. It is
	 * necessary to rewrite multiple row values.
	 *
	 * @param string $query
	 */
Method to execute INSERT query for SQLite version 3.7.10 or lesser.
It executes the INSERT query for SQLite version 3.7.10 or lesser. It is
necessary to rewrite multiple row values.

@param string $query
Method to execute INSERT query for SQLite version 3 . 7 . 10 or lesser . It executes the INSERT query for SQLite version 3 . 7 . 10 or lesser . It is necessary to rewrite multiple row values . @param string $query
private function execute_insert_query($query) {
		global $wpdb;
		$multi_insert = false;
		$statement    = null;
		$engine       = $this->prepare_engine($this->query_type);
		if (preg_match('/(INSERT.*?VALUES\\s*)(\(.*\))/imsx', $query, $matched)) {
			$query_prefix = $matched[1];
			$values_data  = $matched[2];
			if (stripos($values_data, 'ON DUPLICATE KEY') !== false) {
				$exploded_parts = $values_data;
			} elseif (stripos($query_prefix, "INSERT INTO $wpdb->comments") !== false) {
				$exploded_parts = $values_data;
			} else {
				$exploded_parts = $this->parse_multiple_inserts($values_data);
			}
			$count = count($exploded_parts);
			if ($count > 1) {
				$multi_insert = true;
			}
		}
		if ($multi_insert) {
			$first = true;
			foreach ($exploded_parts as $value) {
				if (substr($value, -1, 1) === ')') {
					$suffix = '';
				} else {
					$suffix = ')';
				}
				$query_string              = $query_prefix . ' ' . $value . $suffix;
				$this->rewritten_query     = $engine->rewrite_query($query_string, $this->query_type);
				$this->queries[]           = "Rewritten:\n" . $this->rewritten_query;
				$this->extracted_variables = array();
				$this->extract_variables();
				if ($first) {
					$statement = $this->prepare_query();
					$this->execute_query($statement);
					$first = false;
				} else {
					$this->execute_query($statement);
				}
			}
		} else {
			$this->rewritten_query = $engine->rewrite_query($query, $this->query_type);
			$this->queries[]       = "Rewritten:\n" . $this->rewritten_query;
			$this->extract_variables();
			$statement = $this->prepare_query();
			$this->execute_query($statement);
		}
	}
private function execute_insert_query ( $ query ) { global $ wpdb ; $ multi_insert = false ; $ statement = null ; $ engine = $ this -> prepare_engine ( $ this -> query_type ) ; if ( preg_match ( '/(INSERT.*?VALUES\\s*)(\(.*\))/imsx' , $ query , $ matched ) ) { $ query_prefix = $ matched [ 1 ] ; $ values_data = $ matched [ 2 ] ; if ( stripos ( $ values_data , 'ON DUPLICATE KEY' ) !== false ) { $ exploded_parts = $ values_data ; } elseif ( stripos ( $ query_prefix , " INSERT INTO  $ wpdb -> comments " ) !== false ) { $ exploded_parts = $ values_data ; } else { $ exploded_parts = $ this -> parse_multiple_inserts ( $ values_data ) ; } $ count = count ( $ exploded_parts ) ; if ( $ count > 1 ) { $ multi_insert = true ; } } if ( $ multi_insert ) { $ first = true ; foreach ( $ exploded_parts as $ value ) { if ( substr ( $ value , - 1 , 1 ) === ')' ) { $ suffix = '' ; } else { $ suffix = ')' ; } $ query_string = $ query_prefix . ' ' . $ value . $ suffix ; $ this -> rewritten_query = $ engine -> rewrite_query ( $ query_string , $ this -> query_type ) ; $ this -> queries [ ] = " Rewritten: \n " . $ this -> rewritten_query ; $ this -> extracted_variables = array ( ) ; $ this -> extract_variables ( ) ; if ( $ first ) { $ statement = $ this -> prepare_query ( ) ; $ this -> execute_query ( $ statement ) ; $ first = false ; } else { $ this -> execute_query ( $ statement ) ; } } } else { $ this -> rewritten_query = $ engine -> rewrite_query ( $ query , $ this -> query_type ) ; $ this -> queries [ ] = " Rewritten: \n " . $ this -> rewritten_query ; $ this -> extract_variables ( ) ; $ statement = $ this -> prepare_query ( ) ; $ this -> execute_query ( $ statement ) ; } }
Method to execute INSERT query for SQLite version 3.7.10 or lesser.
Method to execute INSERT query for SQLite version 3 . 7 . 10 or lesser .