wordpress/wp-content/plugins/sqlite-integration/query.class.php
/**
	 * Method to rewrite BETWEEN A AND B clause.
	 *
	 * This clause is the same form as natural language, so we have to check if it is
	 * in the data or SQL statement.
	 *
	 * @access private
	 */
Method to rewrite BETWEEN A AND B clause.
This clause is the same form as natural language, so we have to check if it is
in the data or SQL statement.

@access private
Method to rewrite BETWEEN A AND B clause . This clause is the same form as natural language so we have to check if it is in the data or SQL statement . @access private
private function rewrite_between() {
		if (!$this->rewrite_between) return;
		$pattern = '/\\s*(CAST\([^\)]+?\)|[^\\s\(]*)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s\)]*)?\\s*/ims';
		do {
			if (preg_match($pattern, $this->_query, $match)) {
				$column_name  = trim($match[1]);
				$min_value    = trim($match[2]);
				$max_value    = trim($match[3]);
				$max_value    = rtrim($max_value);
				$replacement  = " ($column_name >= $min_value AND $column_name <= $max_value)";
				$this->_query = str_ireplace($match[0], $replacement, $this->_query);
			}
			$this->num_of_rewrite_between--;
		} while ($this->num_of_rewrite_between > 0);
	}
private function rewrite_between ( ) { if ( ! $ this -> rewrite_between ) return ; $ pattern = '/\\s*(CAST\([^\)]+?\)|[^\\s\(]*)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s\)]*)?\\s*/ims' ; do { if ( preg_match ( $ pattern , $ this -> _query , $ match ) ) { $ column_name = trim ( $ match [ 1 ] ) ; $ min_value = trim ( $ match [ 2 ] ) ; $ max_value = trim ( $ match [ 3 ] ) ; $ max_value = rtrim ( $ max_value ) ; $ replacement = "  ( $ column_name  >=  $ min_value  AND  $ column_name  <=  $ max_value ) " ; $ this -> _query = str_ireplace ( $ match [ 0 ] , $ replacement , $ this -> _query ) ; } $ this -> num_of_rewrite_between -- ; } while ( $ this -> num_of_rewrite_between > 0 ) ; }
Method to rewrite BETWEEN A AND B clause.
Method to rewrite BETWEEN A AND B clause .