﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
826	Sonderpreise - xtcCheckSpecials() - Performance	Volker Strähle	somebody	"die Funktion xtcCheckSpecials() in includes/classes/xtcPrice.php:


{{{
  function xtcCheckSpecial($pID) {
    if ($this->cStatus['customers_status_specials'] == '1') {
      $product_query = xtDBquery(""SELECT specials_new_products_price
                                    FROM "".TABLE_SPECIALS.""
                                   WHERE products_id = '"".$pID.""'
                                     AND status = 1
                                     AND (start_date IS NULL 
                                          OR start_date <= NOW())
                                  AND (expires_date >= NOW() OR expires_date IS NULL)"");
      if (xtc_db_num_rows($product_query, true) > 0) {
....
}}}
 
und in der DB dazu passend:

{{{
ALTER TABLE `specials` ADD INDEX(`start_date`);
ALTER TABLE `specials` ADD INDEX(`expires_date`);
}}}
"	Erweiterung	closed	normal	modified-shop-2.0.5.0	Shop	2.0.1.0	fixed				
