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

	protected function sql_orderby() {

		$sql = 'ORDER BY';

		$comma = false;

		foreach ( $this->get( 'sort' ) as $orderby => $order ) {
			$pre   = ( $comma ) ? ', ' : ' ';
			$sql  .= $pre . "n.{$orderby} {$order}";
			$comma = true;
		}

		if ( $this->get( 'suppress_filters' ) ) {
			return $sql;
		}

		return apply_filters( $this->get_filter( 'orderby' ), $sql, $this );

	}


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.