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

LifterLMS LifterLMS

Code Reference

  • Home
  • 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

  • Description
    • Return
    • Source
    • Changelog
  • Related
    • Uses
  • User Contributed Notes

Description #Description


Return #Return

(void)


Top ↑

Source #Source

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

	protected function preprare_query() {

		global $wpdb;

		$vars = array();

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

		$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
		);

		return $sql;

	}

Expand full source code Collapse full source code View on GitHub


Top ↑

Changelog #Changelog

Changelog
Version Description
3.15.0 Introduced.

Top ↑

Related #Related

Top ↑

Uses #Uses

Uses
Uses Description
includes/class.llms.query.user.postmeta.php: LLMS_Query_User_Postmeta::sql_where()

SQL “where” clause for the query


Top ↑

User Contributed Notes #User Contributed Notes

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

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