SELECT * FROM travel_test.ad_server WHERE height='240' AND fixed_dir = 'index' AND fixed_site = 'baton_rouge' AND company != 'Google' AND htm_type != 'inc' AND pref > 0 GROUP BY comp_id ORDER BY IF(pref >= 1, (ROUND(RAND()* pref)* 5), fixed_pos) DESC, fixed_pos DESC LIMIT 1Got error 28 from storage engine