- $result = SQL_QUERY("SELECT action, title, counter FROM "._MYSQL_PREFIX."_".$mod."_menu WHERE what != '' ORDER BY counter DESC", __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT action, title, counter FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY counter DESC",
+ array($mod), __FILE__, __LINE__);