Noptin_Automation_Rules_Table::prepare_query()

Prepares the display query


Source Source

File: includes/automation-rules/class-noptin-automation-rules-table.php

	public function prepare_query() {
		global $wpdb;

		$table       = noptin()->automation_rules->get_table();
		$paged       = empty( $_GET['paged'] ) ? 1 : (int) $_GET['paged'];
		$offset      = ( $paged - 1 ) * 10;
        $this->items = $wpdb->get_results(
			$wpdb->prepare( "SELECT * FROM $table ORDER BY created_at DESC LIMIT %d,10", $offset )
		);
		$this->total = $wpdb->get_var( "SELECT COUNT(`id`) FROM $table" );

	}


Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation