From: Anthony Talarico Date: Tue, 1 May 2018 16:49:54 +0000 (-0400) Subject: testing limit set on the queries to try and catch any errors X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=2d9164b7a0282d4928b6544d235dea20a6cfcf62;p=WP-Plugins%2Fglm-member-db-for-sale.git testing limit set on the queries to try and catch any errors --- diff --git a/models/admin/management/itemsImport.php b/models/admin/management/itemsImport.php index 39ec595..5f3a4ce 100644 --- a/models/admin/management/itemsImport.php +++ b/models/admin/management/itemsImport.php @@ -102,7 +102,8 @@ class GlmMembersAdmin_management_itemsImport $import = false; $importNotice = ''; $option = ''; - + $start = (isset($_REQUEST['start']) && $_REQUEST['start'] ) ? $_REQUEST['start'] : 0; + if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') { $option = $_REQUEST['option']; } @@ -136,7 +137,7 @@ class GlmMembersAdmin_management_itemsImport ); // FOR SALE - $forsale_sql = "SELECT * FROM forsale;"; + $forsale_sql = "SELECT * FROM forsale ORDER BY id LIMIT $limit OFFSET $START;"; $stmt = $dbh->query($forsale_sql); $forsale = $stmt->fetchAll(PDO::FETCH_ASSOC); $count = 0; @@ -282,10 +283,10 @@ class GlmMembersAdmin_management_itemsImport $url = get_site_url() . '/wp-admin/admin.php?page=glm-members-admin-menu-management&glm_action=itemImport&option=importItems'; - $limit = 200; + $limit = 50; $resultMessage = "
Start: $start
"; $start += $limit; - $resultMessage .= "

Next

"; + $resultMessage .= "

Next

"; break; default: break;