-$result = SQL_QUERY("SELECT id, status, action, new_status FROM "._MYSQL_PREFIX."_surfbar_actions ORDER BY id ASC", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT `id`,`status`,`action`,`new_status`
+FROM `{?_MYSQL_PREFIX?}_surfbar_actions`
+ORDER BY `status` ASC, `action` ASC", __FILE__, __LINE__);