From b9f402f133b7f1ac442984e99b043da0b74dc0cb Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 25 Jul 2016 08:15:45 -0400 Subject: [PATCH] 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. --- models/admin/leads/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ); -- 2.17.1