$e_schuhe = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schuhe' AND i.level <='$char_1[level]' group by i.name order by i.level desc");
$e_schuhe = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schuhe' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc");
$e_schwert = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schwert' AND i.level <='$char_1[level]' group by i.name order by i.level desc");
$e_schwert = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schwert' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc");
$e_rustung = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Ruestung' AND i.level <='$char_1[level]' group by i.name order by i.level desc");
$e_rustung = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Ruestung' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc");
$e_schild = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schild' AND i.level <='$char_1[level]' group by i.name order by i.level desc");
$e_schild = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schild' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc");
$e_helm = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Helm' AND i.level <='$char_1[level]' group by i.name order by i.level desc");
$e_helm = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.type='$char_1[type]' OR i.type='ALL') AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Helm' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc");