LLMS_Database_Query::sql_limit()

Retrieve the prepared SQL for the LIMIT clause.


Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.database.query.php

	protected function sql_limit() {

		global $wpdb;

		$sql = $wpdb->prepare( 'LIMIT %d, %d', $this->get_skip(), $this->get( 'per_page' ) );

		/**
		 * Filters the query LIMIT clause.
		 *
		 * The dynamic part of the filter `$this->id` identifies the extending query.
		 *
		 * @since 3.16.0
		 *
		 * @param string              $sql      The LIMIT clause of the query.
		 * @param LLMS_Database_Query $db_query The LLMS_Database_Query instance.
		 */
		return apply_filters( "llms_{$this->id}_query_limit", $sql, $this );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.5.1 Drop use of $this->get_filter('limit') in favor of "llms_{$this->id}_query_limit".
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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