if (isset($tag) && $a == "")
$allyrow = doquery("SELECT * FROM {{table}} WHERE ally_tag='".mysql_escape_string ( $tag )."}'", "alliance", true);
elseif(is_numeric($a) && $a != 0 && $tag == "")
$allyrow = doquery("SELECT * FROM {{table}} WHERE id='".mysql_escape_string ( $a )."", "alliance", true);