LLMS_Notifications_Query::preprare_query()
Prepare the SQL for the query.
Contents
Return Return
(string)
Source Source
File: includes/notifications/class.llms.notifications.query.php
*/ protected function prepare_query() { 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 SQL_CALC_FOUND_ROWS * 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 return $sql;
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.9.4 | Unknown. |
3.8.0 | Introduced. |