From a5af988d53764d39bf1f59a6fb93baee1c4d6e85 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 7 Jul 2011 08:51:52 -0700 Subject: [PATCH] Remove comment bloat from dynamic query builder. --- system/db/query/dynamic.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/system/db/query/dynamic.php b/system/db/query/dynamic.php index 354ac57b..8993de6b 100644 --- a/system/db/query/dynamic.php +++ b/system/db/query/dynamic.php @@ -14,32 +14,21 @@ class Dynamic { */ public static function build($method, $parameters, $query) { - // --------------------------------------------------------- // Strip the "where_" off of the method. - // --------------------------------------------------------- $finder = substr($method, 6); - // --------------------------------------------------------- // Split the column names from the connectors. - // --------------------------------------------------------- $segments = preg_split('/(_and_|_or_)/i', $finder, -1, PREG_SPLIT_DELIM_CAPTURE); - // --------------------------------------------------------- - // The connector variable will determine which connector - // will be used for the condition. We'll change it as we - // come across new connectors in the dynamic method string. + // The connector variable will determine which connector will be used for the condition. + // We'll change it as we come across new connectors in the dynamic method string. // - // The index variable helps us get the correct parameter - // value for the where condition. We increment it each time - // we add a condition. - // --------------------------------------------------------- + // The index variable helps us get the correct parameter value for the where condition. + // We increment it each time we add a condition. $connector = 'AND'; $index = 0; - // --------------------------------------------------------- - // Iterate through each segment and add the conditions. - // --------------------------------------------------------- foreach ($segments as $segment) { if ($segment != '_and_' and $segment != '_or_')