From: Steve Sutton Date: Mon, 25 Jul 2016 12:15:45 +0000 (-0400) Subject: Updating how to get the lead entry records for the csv file X-Git-Tag: v1.0.0^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=b9f402f133b7f1ac442984e99b043da0b74dc0cb;p=WP-Plugins%2Fglm-member-db-leads.git Updating how to get the lead entry records for the csv file To not get timeouts or memory errors use direct wordpress query instead of the DataAbstract method to get the list. --- diff --git a/models/admin/leads/index.php b/models/admin/leads/index.php index 9be36b5..17cf5b7 100644 --- a/models/admin/leads/index.php +++ b/models/admin/leads/index.php @@ -323,7 +323,12 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry switch ( $option ) { case 'csv': - $leads = $this->getList( $where, $order ); + $sql = " + SELECT T.* + FROM " . GLM_MEMBERS_LEADS_PLUGIN_DB_PREFIX . "lead_entry T + WHERE $where + ORDER BY $order"; + $leads = $this->wpdb->get_results( $sql, ARRAY_A ); break; default: $listResult = $this->getSimpleEntriesList( $where, $order, true, 'id', $start, $limit );