LLMS_Analytics_Widget::query()


Description Description


Source Source

File: includes/abstracts/abstract.llms.analytics.widget.php

	protected function query() {

		global $wpdb;
		// no output options
		if ( in_array( $this->query_function, array( 'get_var', 'get_col' ) ) ) {
			$this->results = $wpdb->{$this->query_function}( $wpdb->prepare( $this->query, $this->query_vars ) );
		} // End if().
		else {
			$this->results = $wpdb->{$this->query_function}( $wpdb->prepare( $this->query, $this->query_vars ), $this->output_type );
		}

		$this->prepared_query = trim( str_replace( array( "\r", "\n", "\t", '  ' ), ' ', $wpdb->last_query ) );

		if ( ! $wpdb->last_error ) {

			$this->success = true;
			$this->message = 'success';

		} else {

			$this->message = $wpdb->last_error;

		}

	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: