Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for scripts/php/sk-nic/SK-NIC.php between version 1.10 and 1.11

version 1.10, 2011/08/11 08:50:54 version 1.11, 2011/08/11 08:53:09
Line 13 
Line 13 
  *   *
  */   */
   
 /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.9 2010-08-11 20:43:14 nepto Exp $ */  /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.10 2011-08-11 08:50:54 nepto Exp $ */
   
 require_once 'DB.php';  require_once 'DB.php';
   
Line 325  class SK_NIC
Line 325  class SK_NIC
   
                         /*                          /*
                          * Revenue queries                           * Revenue queries
                            *
                            * NOTE: Clause "GROUP BY 1, 2, 3" below is not absolutelly
                            * neccessary, since without that clause it works well on MySQL
                            * 5.0.84-1-log, but on 5.0.51a-24+lenny4-log it creates this
                            * error: ERROR 1140 (42000): Mixing of GROUP columns
                            * (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if
                            * there is no GROUP BY clause
                          */                           */
   
                         // Registrars with 0-100 domains                          // Registrars with 0-100 domains
Line 336  class SK_NIC
Line 343  class SK_NIC
                                         WHERE status IN ("DOM_OK","DOM_WARN","DOM_LNOT","DOM_TRAN")                                          WHERE status IN ("DOM_OK","DOM_WARN","DOM_LNOT","DOM_TRAN")
                                         GROUP BY dt_changed, id_reg                                          GROUP BY dt_changed, id_reg
                                         HAVING (COUNT(*) <= 100)                                          HAVING (COUNT(*) <= 100)
                                 ) AS X';                                  ) AS X
                                   GROUP BY 1, 2, 3';
                         // Registrars with 101-1000 domains                          // Registrars with 101-1000 domains
                         $queries[] = 'INSERT INTO sknic_domains_stats                          $queries[] = 'INSERT INTO sknic_domains_stats
                                 SELECT dt_changed, "revenue" AS name, "DOM-100", ROUND(SUM(revenue),0) AS revenue                                  SELECT dt_changed, "revenue" AS name, "DOM-100", ROUND(SUM(revenue),0) AS revenue
Line 346  class SK_NIC
Line 354  class SK_NIC
                                         WHERE status IN ("DOM_OK","DOM_WARN","DOM_LNOT","DOM_TRAN")                                          WHERE status IN ("DOM_OK","DOM_WARN","DOM_LNOT","DOM_TRAN")
                                         GROUP BY dt_changed, id_reg                                          GROUP BY dt_changed, id_reg
                                         HAVING (COUNT(*) > 100 AND COUNT(*) <= 1000)                                          HAVING (COUNT(*) > 100 AND COUNT(*) <= 1000)
                                 ) AS X';                                  ) AS X
                                   GROUP BY 1, 2, 3';
                         // Registrars with 1001-10000 domains                          // Registrars with 1001-10000 domains
                         $queries[] = 'INSERT INTO sknic_domains_stats                          $queries[] = 'INSERT INTO sknic_domains_stats
                                 SELECT dt_changed, "revenue" AS name, "DOM-1000", ROUND(SUM(revenue)) AS revenue                                  SELECT dt_changed, "revenue" AS name, "DOM-1000", ROUND(SUM(revenue)) AS revenue
Line 356  class SK_NIC
Line 365  class SK_NIC
                                         WHERE status IN ("DOM_OK","DOM_WARN","DOM_LNOT","DOM_TRAN")                                          WHERE status IN ("DOM_OK","DOM_WARN","DOM_LNOT","DOM_TRAN")
                                         GROUP BY dt_changed, id_reg                                          GROUP BY dt_changed, id_reg
                                         HAVING (COUNT(*) > 1000)                                          HAVING (COUNT(*) > 1000)
                                 ) AS X';                                  ) AS X
                                   GROUP BY 1, 2, 3';
                         // Fee for changing registrar                          // Fee for changing registrar
                         $queries[] = 'INSERT INTO sknic_domains_stats                          $queries[] = 'INSERT INTO sknic_domains_stats
                                 SELECT dt_changed, "revenue" AS name, "CHANGEREG", ROUND(SUM(revenue)) AS revenue                                  SELECT dt_changed, "revenue" AS name, "CHANGEREG", ROUND(SUM(revenue)) AS revenue
Line 365  class SK_NIC
Line 375  class SK_NIC
                                         FROM sknic_domains_import                                          FROM sknic_domains_import
                                         WHERE status IN ("DOM_TRAN")                                          WHERE status IN ("DOM_TRAN")
                                         GROUP BY dt_changed, id_reg                                          GROUP BY dt_changed, id_reg
                                 ) AS X';                                  ) AS X
                                   GROUP BY 1, 2, 3';
                 }                  }
   
                 foreach ($queries as $query) {                  foreach ($queries as $query) {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top