• LifterLMS
  • Knowledge Base
  • Academy
  • Blog
  • Podcast
  • Contributors
  • My Account

LifterLMS LifterLMS

  • Code Reference
  • REST API
  • LLMS-CLI

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Code Reference / Classes / LLMS_Query_User_Postmeta / LLMS_Query_User_Postmeta::preprare_query()

LLMS_Query_User_Postmeta::preprare_query()

Prepare the SQL for the query.

Contents

  • Return
  • Source
  • Changelog
  • User Contributed Notes

Return #Return

(string)


Top ↑

Source #Source

File: includes/class.llms.query.user.postmeta.php

	 */
	protected function prepare_query() {

		global $wpdb;

		$vars = array();

		$vars[] = $this->get_skip();
		$vars[] = $this->get( 'per_page' );

		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
		$sql = $wpdb->prepare(
			"SELECT SQL_CALC_FOUND_ROWS meta_id
			 FROM {$wpdb->prefix}lifterlms_user_postmeta
			 {$this->sql_where()}
			 {$this->sql_orderby()}
			 LIMIT %d, %d;",
			$vars
		);
		// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared

		return $sql;

Expand full source code Collapse full source code View on GitHub


Top ↑

Changelog #Changelog

Changelog
Version Description
3.15.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

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

© 2014 - 2023 LifterLMS · Privacy Policy · Terms and Conditions

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.