LLMS_Events_Query::prepare_query()
Prepare the SQL for the query.
Return Return
(string)
Source Source
File: includes/class-llms-events-query.php
protected function prepare_query() {
global $wpdb;
$from = "FROM {$wpdb->prefix}lifterlms_events";
$where = $this->sql_where();
if ( ! $this->get( 'no_found_rows' ) ) {
$this->count_query = "SELECT COUNT(*) {$from} {$where}";
}
return "SELECT {$this->sql_select_columns( 'id' )}
{$from}
{$where}
{$this->sql_orderby()}
{$this->sql_limit()};";
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 6.0.0 | Renamed from preprare_query(). |
| 4.7.0 | Use $this->sql_select_columns({columns}) to determine the columns to select. |
| 3.36.0 | |
| 10.0.0 | Introduced. |