Automattic\WooCommerce\Admin\API\Reports

DataStore::get_limit_sql_params()protectedWC 1.0

Fills LIMIT clause of SQL request based on user supplied parameters.

Method of the class: DataStore{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_limit_sql_params( $query_args );
$query_args(array) (required)
Parameters supplied by the user.

DataStore::get_limit_sql_params() code WC 7.3.0

protected function get_limit_sql_params( $query_args ) {
	global $wpdb;
	$params = $this->get_limit_params( $query_args );

	$this->clear_sql_clause( 'limit' );
	$this->add_sql_clause( 'limit', $wpdb->prepare( 'LIMIT %d, %d', $params['offset'], $params['per_page'] ) );
	return $params;
}