### Eclipse Workspace Patch 1.0 #P commerce Index: lib/class.tx_commerce_db_article.php =================================================================== --- lib/class.tx_commerce_db_article.php (revision 30260) +++ lib/class.tx_commerce_db_article.php (working copy) @@ -130,13 +130,14 @@ if(is_object($GLOBALS['TSFE']->sys_page)){ $proofSQL = $GLOBALS['TSFE']->sys_page->enableFields('tx_commerce_article_prices',$GLOBALS['TSFE']->showHiddenRecords); } - $result=$GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,fe_group','tx_commerce_article_prices',"uid_article = $uid and price_scale_amount_start <= $count and price_scale_amount_end >= $count" . $proofSQL . $additionalWhere,'',$orderField); - if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)>0){ - while ($return_data=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)){ - $price_uid_list[$return_data['fe_group']][]=$return_data['uid']; - } - $GLOBALS['TYPO3_DB']->sql_free_result($result); - return $price_uid_list; + $result=$GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,fe_group','tx_commerce_article_prices',"uid_article = $uid and price_scale_amount_start <= $count and price_scale_amount_end >= $count" . $proofSQL . $additionalWhere,'',$orderField); + if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)>0){ + while ($return_data=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)){ + $price_uid_list[$return_data['fe_group']][]=$return_data['uid']; + if ( $return_data['fe_group'] == '' ) { $return_data['fe_group'] = 0; } + } + $GLOBALS['TYPO3_DB']->sql_free_result($result); + return $price_uid_list; }else{ $this->error("exec_SELECTquery('uid','tx_commerce_article_prices',\"uid_article = $uid\"); returns no Result"); return false;