LLMS_Notifications_Query::sql_orderby()

Retrieve the prepared SQL for the ORDER clause Slightly modified from abstract to include the table name to prevent ambiguous errors


Return Return

(string)


Top ↑

Source Source

File: includes/notifications/class.llms.notifications.query.php

		global $wpdb;

		$vars = array(
			$this->get_skip(),
			$this->get( 'per_page' ),
		);

		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- SQL is prepared in other functions.
		$sql = $wpdb->prepare(
			"SELECT {$this->sql_select_columns()}
			FROM {$wpdb->prefix}lifterlms_notifications AS n
			LEFT JOIN {$wpdb->posts} AS p on p.ID = n.post_id
			{$this->sql_where()}
			{$this->sql_orderby()}
			LIMIT %d, %d
			;",
			$vars
		);
		// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared


Top ↑

Changelog Changelog

Changelog
Version Description
3.9.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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