Warning: mysql_query() [function.mysql-query]: Unable to save result set in C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\core\db_mysql.php on line 77

Database error: 5 : Out of memory (Needed 75497444 bytes)
Invalid query: SELECT COUNT(DISTINCT(avail_products.product_id)) FROM avail_products INNER JOIN cscart_products as products ON products.product_id=avail_products.product_id AND products.avail IN ('Y') LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id=products.product_id AND descr1.lang_code='RU' LEFT JOIN cscart_product_options_inventory as inventory ON inventory.product_id=products.product_id LEFT JOIN prices ON prices.product_id=avail_products.product_id WHERE 1 AND IF(products.tracking='O', inventory.amount>0, products.amount>0)


Backtrace:
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\index.php
Line:85
Function:include
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\targets\categories.php
Line:36
Function:include
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\include\customer\categories.php
Line:70
Function:include
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\include\common\search_products.php
Line:284
Function:include
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\include\common\search_products_improved.php
Line:94
Function:db_get_field
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\core\fn_database.php
Line:92
Function:db_query
File:C:\Inetpub\vhosts\stylist-prof.ru\httpdocs\core\db_mysql.php
Line:94
Function:db_debug_error