Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /var/www/eximtest/data/www/mikrozaimypro.ru/engine/server/cprice/index.php on line 28 SQL-: select * from (select * from (select ID_GOOD, good_url, good_visible, count(ID_GOOD) as cnt from cprice_goods natural join cprice_goods_features where good_visible=1 && good_deleted=0 && ((ID_FEATURE=86 && goodfeature_value=®=) || ( ID_FEATURE=92 && (goodfeature_value in (0,2918,2924,2951,2965,2984,3023,3074,3081,3201,3202,5250,5309,5627) ||goodfeature_value in (0,2903,2927,2933,2965,3052,3072,3087,3183,3323,3372) ||goodfeature_value in (0,2903,2908,2912,2914,2916,2922,2929,2931,2935,2938,2939,2941,2946,2948,2959,2967,2980,2982,2993,2995,2998,3001,3004,3023,3061,3062,3064,3073,3095,3119,3206,3225,3229,3237,3324,3383,3391,3442,3611,3834,3837,4015,4127,4129,4448,5309) ))) group by ID_GOOD) as tbl where cnt=2) as t1 inner join cprice_goods_features as t2 on t1.ID_GOOD=t2.ID_GOOD inner join cprice_rubric_goods as t3 on t1.ID_GOOD=t3.ID_GOOD WHERE t3.ID_RUBRIC<>126 && t3.ID_RUBRIC<>127 && t3.ID_RUBRIC<>117 && t2.ID_FEATURE=226 order by CAST(t2.goodfeature_value AS decimal(10,5)) DESC, t2.ID_GOOD limit 300,50 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=) || ( ID_FEATURE=92 && (goodfeature_value in (0,2918,2924,2951,2965,2984,3023' at line 2