wordpress/wp-content/plugins/sqlite-integration/query.class.php
/**
	 * method to handle SHOW TABLES query.
	 *
	 * @access private
	 */
method to handle SHOW TABLES query.
@access private
method to handle SHOW TABLES query . @access private
private function handle_show_query(){
		$this->_query = str_ireplace(' FULL', '', $this->_query);
		$table_name = '';
		$pattern    = '/^\\s*SHOW\\s*TABLES\\s*.*?(LIKE\\s*(.*))$/im';
		if (preg_match($pattern, $this->_query, $matches)) {
			$table_name = str_replace(array("'", ';'), '', $matches[2]);
		}
		if (!empty($table_name)) {
			$suffix = ' AND name LIKE '. "'" . $table_name . "'";
		} else {
			$suffix = '';
		}
		$this->_query = "SELECT name FROM sqlite_master WHERE type='table'" . $suffix . ' ORDER BY name DESC';
	}
private function handle_show_query ( ) { $ this -> _query = str_ireplace ( ' FULL' , '' , $ this -> _query ) ; $ table_name = '' ; $ pattern = '/^\\s*SHOW\\s*TABLES\\s*.*?(LIKE\\s*(.*))$/im' ; if ( preg_match ( $ pattern , $ this -> _query , $ matches ) ) { $ table_name = str_replace ( array ( " ' " , ';' ) , '' , $ matches [ 2 ] ) ; } if ( ! empty ( $ table_name ) ) { $ suffix = ' AND name LIKE ' . " ' " . $ table_name . " ' " ; } else { $ suffix = '' ; } $ this -> _query = " SELECT name FROM sqlite_master WHERE type='table' " . $ suffix . ' ORDER BY name DESC' ; }
method to handle SHOW TABLES query.
method to handle SHOW TABLES query .