LLMS_REST_Webhooks_Query::prepare_query()

Prepare the SQL for the query


Return Return

(string)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/class-llms-rest-webhooks-query.php

	protected function prepare_query() {

		global $wpdb;

		$from  = "FROM {$wpdb->prefix}lifterlms_webhooks";
		$where = $this->sql_where();

		if ( ! $this->get( 'no_found_rows' ) ) {
			$this->count_query = "SELECT COUNT(*) {$from} {$where}";
		}

		return "SELECT {$this->sql_select_columns( 'id' )}
				{$from}
				{$where}
				{$this->sql_orderby()}
				{$this->sql_limit()};";

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.5 Set $this->count_query for found results without SQL_CALC_FOUND_ROWS.
1.0.0-beta.22 Renamed from preprare_query().
1.0.0-beta.16 Use $this->sql_select_columns({columns}) to determine the columns to select.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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